☰ INDEX
Blood_Banking_and_Transfusion_Medicine-Blood_Banking_and_Transfusion_Pathology
Blood_Banking_and_Transfusion_Medicine-Previous_Year_Questions
Bone_Disorders-Bone_and_soft_tissue_pathology
Bone_Disorders-Previous_Year_Questions
Breast_Pathology-Benign_Breast_Lesions
Breast_Pathology-Malignant_Breast_Lesions
Breast_Pathology-Previous_Year_Questions
CVS__Blood_Vessels_and_Vasculitis-Carditis_and_Cardiac_tumors
CVS__Blood_Vessels_and_Vasculitis-Ischemic_Heart_Disease_and_Myocardial_Infarction
CVS__Blood_Vessels_and_Vasculitis-Previous_Year_Questions
CVS__Blood_Vessels_and_Vasculitis-RHD_and_Infective_Endocarditis
CVS__Blood_Vessels_and_Vasculitis-Sclerosis_and_Vascular_Tumors
CVS__Blood_Vessels_and_Vasculitis-Vasculitis
Cell_Injury-Cell_Death
Cell_Injury-Cell_Injury__Free_Radical_Injury__and_ER_Stress_Related
Cell_Injury-Cell_ageing__Autophagy_and_Cellular_adaptations
Cell_Injury-Intracellular_Accumulations
Cell_Injury-Previous_Year_Questions
Central_Nervous_System-CNS_Pathology
Central_Nervous_System-Previous_Year_Questions
Endocrinology-Parathyroid__Pituitary__and_Adrenal_Glands
Endocrinology-Previous_Year_Questions
Endocrinology-Thyroid_Gland
Gastrointestinal_Tract-Basics_of_GIT_and_Esophagus
Gastrointestinal_Tract-Intestinal_Polyps_and_Intestinal_Carcinoma
Gastrointestinal_Tract-Malabsorption_Syndrome__Celiac_Disease__and_IBD
Gastrointestinal_Tract-Peptic_Ulcer_Disease__Gastric_Polyps__and_Tumors
Gastrointestinal_Tract-Previous_Year_Questions
Genetics-Diagnosis_of_Genetic_Disorders_and_Miscellaneous
Genetics-Genetics-_Introduction___Mendelian_Disorders
Genetics-Non-Mendelian_Disorders
Genetics-Previous_Year_Questions
Genital_System-Pathology_of_Female_Genital_Tract-I
Genital_System-Pathology_of_Female_Genital_Tract-II
Genital_System-Pathology_of_Male_Genital_Tract
Genital_System-Previous_Year_Questions
Hematology__Red_Blood_Cells-Hemolytic_Anemia-I
Hematology__Red_Blood_Cells-Hemolytic_Anemia-II
Hematology__Red_Blood_Cells-Introduction_to_Hematology
Hematology__Red_Blood_Cells-Macrocytic_Hypochromic_Anemia
Hematology__Red_Blood_Cells-Microcytic_Hypochromic_Anemia_
Hematology__Red_Blood_Cells-Previous_Year_Questions
Hematology__White_Blood_Cells-ALL_and_AML
Hematology__White_Blood_Cells-CML_and_CLL
Hematology__White_Blood_Cells-Hodgkin_s_and_Non-Hodgkin_s_Lymphoma
Hematology__White_Blood_Cells-Myeloid_Disorders
Hematology__White_Blood_Cells-Plasma_Cell_Disorders
Hematology__White_Blood_Cells-Previous_Year_Questions
Hematology__White_Blood_Cells-WBC_Basics_and_Instruments
Immunity-Amyloidosis
Immunity-Immune_Tolerance_and_Autoimmune_Disease
Immunity-Immunodeficiency_disorders
Immunity-Previous_Year_Questions
Immunity-Transplant_Immunity
Immunity-Types_of_Hypersensitivity_Reactions
Immunity-Types_of_Immunity
Inflammation-Acute_Inflammation
Inflammation-Chronic_Inflammation
Inflammation-Mediators_of_Inflammation
Inflammation-Previous_Year_Questions
Liver__Biliary_System_and_Pancreas-Hepatic_Tumors_and_Pancreas
Liver__Biliary_System_and_Pancreas-Hepatobiliary_Pathology-I
Liver__Biliary_System_and_Pancreas-Hepatobiliary_Pathology-II
Liver__Biliary_System_and_Pancreas-Previous_Year_Questions
Miscellaneous-Previous_Year_Questions
Musculoskeletal_Disorders-Previous_Year_Questions
Neoplasia-Classification_and_Features_of_Neoplasia
Neoplasia-Diagnosis_of_Tumors_and_Paraneoplastic_Syndromes
Neoplasia-Etiology_of_Neoplasia
Neoplasia-Fundamentals_of_Neoplasia
Neoplasia-Previous_Year_Questions
Platelet_and_Bleeding_Disorders-Platelet_and_Hemostasis_Disorders
Platelet_and_Bleeding_Disorders-Previous_Year_Questions
Platelets_and_Blood_Transfusion-Previous_Year_Questions
Rapid_Revision_with_Images-Previous_Year_Questions
Renal_System-Basics_of_Renal_Pathology
Renal_System-Nephritic_and_Nephrotic_Syndromes
Renal_System-Previous_Year_Questions
Renal_System-Renal_Tumors
Respiratory_System-Congenital_Anomalies_and_Lung_Infections
Respiratory_System-Obstructive_lung_disease
Respiratory_System-Previous_Year_Questions
Respiratory_System-Pulmonary_Hypertension_and_Lung_Tumors
Respiratory_System-Sarcoidosis_and_Occupational_Lung_Diseases
Salivary_Glands-Previous_Year_Questions
Salivary_Glands-Salivary_Gland_Pathology
Skin_Pathology-Skin_pathology
Skin_and_Musculoskeletal-Previous_Year_Questions
Techniques_in_Pathology-Previous_Year_Questions
Thromoboembolic_Disorders-Previous_Year_Questions
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A pathologist is reviewing the chromosomal locations of blood group antigens. When considering the Rh blood group system, including the Rh antigen, which of the following chromosomes is involved?", "options": [{"label": "A", "text": "Chr. 1", "correct": true}, {"label": "B", "text": "Chr. 9", "correct": false}, {"label": "C", "text": "Chr. 19", "correct": false}, {"label": "D", "text": "Chr. 13", "correct": false}], "correct_answer": "A. Chr. 1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:654px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Properties</strong></p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ABO system</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rh system</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood groups</p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A, B, AB, and O</p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rh-positive & negative</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Genetic loci</p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>On <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 9</p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>On <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 1</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ag and Ab</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Group</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antigen</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antibody</strong></p>\n</td>\n<td colspan=\"2\" rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>C, c, D, E, & e antigens.</li>\n<li>‘d’ indicates the absence of D.</li>\n<li>Most important: <span class=\"customMeta\" data-dictid=\"b6f55186c9169277718191685b18b3\">Anti-D</span> antibody.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>O</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anti-A & anti-B</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anti-B</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anti-A</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AB</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A & B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antigens also seen on/in</p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endothelial & epithelial cells, plasma, saliva, and <span class=\"customMeta\" data-dictid=\"613e5acf29169277719839af208a78\">semen</span> (not seen in CSF)</p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No other cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Type of Ab</p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IgM (naturally occurring).</p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IgG (does not occur naturally).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinical significance</p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anti-A & anti-B can cause severe <span class=\"customMeta\" data-dictid=\"837d6227d81692777190a063ea2cd4\">intravascular</span> haemolysis after <span class=\"customMeta\" data-dictid=\"10dcdd93561692777190d73418c5a7\">incompatible</span> transfusion.</li>\n<li>ABO-matching is required before the <span class=\"customMeta\" data-dictid=\"ee9f07b0a81692777200e416e4e5d7\">transplantation</span> of solid organs.</li>\n</ul>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rh -ve individuals make <span class=\"customMeta\" data-dictid=\"b6f55186c9169277718191685b18b3\">anti-D</span> <span class=\"customMeta\" data-dictid=\"c087dfa48f1692777180b90ca2237f\">Ab</span> if:</p>\n<ul>\n<li>Transfused with Rh +ve blood.</li>\n<li>Rh -ve pregnant women is exposed to Rh +ve <span class=\"customMeta\" data-dictid=\"f375a3584316927772020efa386e3e\">fetal</span> RBCs that have <span class=\"customMeta\" data-dictid=\"6b4030e51a1692777185c6a9dc95b0\">crossed</span> the placenta.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old male requires a blood transfusion after a severe bike accident. He is known to have the Bombay phenotype. Before the transfusion, his blood sample is sent to the laboratory for compatibility testing. Based on his blood group, which of the following statements is incorrect?", "options": [{"label": "A", "text": "Lack of H, A and B antigens on RBCs", "correct": false}, {"label": "B", "text": "Lack of H, A and B substances in saliva", "correct": false}, {"label": "C", "text": "Lack of antigens of several blood group systems", "correct": true}, {"label": "D", "text": "H, A and B antibodies will always be present in the serum", "correct": false}], "correct_answer": "C. Lack of antigens of several blood group systems", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/rzo9fFsbbVcWVP4yMohU1747309265.mp3", "video": ""}, {"text": "A 23-year-old individual is scheduled to donate blood for a local blood drive. To ensure the safety of the blood supply, the donor's blood will be screened for various infectious diseases. Among the following options, which one is typically not included in the routine screening for donated blood?", "options": [{"label": "A", "text": "Malaria", "correct": false}, {"label": "B", "text": "Hepatitis B", "correct": false}, {"label": "C", "text": "HIV", "correct": false}, {"label": "D", "text": "Dengue fever", "correct": true}], "correct_answer": "D. Dengue fever", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:646px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Viral</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bacterial</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parasites</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Others</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Hepatitis (A, B, C, G).</strong></li>\n<li><strong>HIV (I & II).</strong></li>\n<li>HTLV (I & II).</li>\n<li>CMV.</li>\n<li>EBV.</li>\n<li>Parvovirus B19.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Syphilis</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Malaria</strong></li>\n<li>Babesiosis</li>\n<li>Trypanosoma cruzi</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Creutzfeldt-<br/>\n\t\t\t\tJakob disease</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following can be used to store blood for up to 42 days?", "options": [{"label": "A", "text": "ACD", "correct": false}, {"label": "B", "text": "CPD", "correct": false}, {"label": "C", "text": "CPDA", "correct": false}, {"label": "D", "text": "SAGM", "correct": true}], "correct_answer": "D. SAGM", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anticoagulant</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Full form</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Shelf Life</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ACD (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acid <span class=\"customMeta\" data-dictid=\"3569209ba41692777184f88db9316d\">citrate</span> dextrose</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>21 days</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CPD (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Citrate <span class=\"customMeta\" data-dictid=\"189b6fc834169277719580eb39bb4c\">phosphate</span> dextrose</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>21 days</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CPDA (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Citrate <span class=\"customMeta\" data-dictid=\"189b6fc834169277719580eb39bb4c\">phosphate</span> <span class=\"customMeta\" data-dictid=\"baf8b019b01692777186c856f83721\">dextrose</span> adenine</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>35 days</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SAGM (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Saline-adenine-glucose-mannitol</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>42 days</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Based on the agglutination test shown below, what is the blood group?", "options": [{"label": "A", "text": "B Positive", "correct": false}, {"label": "B", "text": "B negative", "correct": false}, {"label": "C", "text": "A positive", "correct": true}, {"label": "D", "text": "AB positive", "correct": false}], "correct_answer": "C. A positive", "question_images": ["https://image.prepladder.com/notes/DM2enwwTpgi8rTTS9vm31731903787.png"], "explanation_images": ["https://image.prepladder.com/content/g85mBgSyFslgpPaoqhGl1736772014.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following: Blood Products Shelf Life A Packed Red Blood Cells (PRBCs) in CPD-A i 1 year B Fresh Frozen Plasma (FFP) ii 35 days C Platelets iii 42 days D PRBC in SAGM iv 5 days", "options": [{"label": "A", "text": "A-iii, B-i, C-iv, D-ii", "correct": false}, {"label": "B", "text": "A-i, B-iii, C-iv, D-ii", "correct": false}, {"label": "C", "text": "A-ii, B-i, C-iv, D-iii", "correct": true}, {"label": "D", "text": "A-ii, B-iii, C-i, D-iv", "correct": false}], "correct_answer": "C. A-ii, B-i, C-iv, D-iii", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:789px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Blood Products</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Shelf Life</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Storage temperature </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Packed Red Blood Cells (PRBCs) in CPD-A</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>35 days</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>1-6 °C</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Fresh Frozen <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">Plasma</span> (FFP)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>1 year</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>-30°C or colder</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Platelets</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>5 days</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>20–24°C (with continuous agitation)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>PRBC in SAGM</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>42 days</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>1–6°C</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the recommended time frame for administering a unit of red blood cells once it has been removed from refrigeration?", "options": [{"label": "A", "text": "1 hour", "correct": false}, {"label": "B", "text": "4 hour", "correct": true}, {"label": "C", "text": "8 hour", "correct": false}, {"label": "D", "text": "24 hour", "correct": false}], "correct_answer": "B. 4 hour", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:642px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Blood product</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Start time</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>End time</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Whole blood/PRBC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Within 30 minutes of removing it from the refrigerator</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>≤ 4 hours</strong></p>\n<p>Discard if this period is exceeded</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Platelets</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediately</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Within 30 minutes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>FFP</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediately</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Within 30 minutes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cryoprecipitate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediately</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Within 30 minutes</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most common complication of blood transfusion?", "options": [{"label": "A", "text": "TRALI", "correct": false}, {"label": "B", "text": "TACO", "correct": false}, {"label": "C", "text": "Delayed Hemolytic Reaction", "correct": false}, {"label": "D", "text": "Febrile Non-hemolytic reaction", "correct": true}], "correct_answer": "D. Febrile Non-hemolytic reaction", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/IT9pqMRrmLSzLI3p6ngJ1736772270.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Immediate <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> Reactions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Delayed <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> Reactions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Onset Time</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Within hours of transfusion</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Days to weeks after transfusion</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cause</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Immunologic reactions, <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> or non-hemolytic</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Immune-mediated, often involving minor <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> sensitisation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Presentation</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Fever, chills, <span class=\"customMeta\" data-dictid=\"c92aa64edb16927771867805a38cc6\">Dyspnea</span> (TRALI, TACO), <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> <span class=\"customMeta\" data-dictid=\"afafb9026e1692777186e3dd168fa8\">distress</span> (TRALI), <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">Pulmonary</span> oedema (TACO), hypothermia, <span class=\"customMeta\" data-dictid=\"2e0552462e16927771871413861fb7\">electrolyte</span> abnormalities, coagulopathy, acid base disorders and hyperkalemia</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Fever, jaundice, Gradual decline in haemoglobin levels (hemolysis)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Severity</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Can range from mild to life-threatening</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Generally less severe than immediate reactions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Examples</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Febrile non-hemolytic reaction (FNHTR)</li>\n<li>Transfusion-related <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> lung injury (TRALI)</li>\n<li>Transfusion-associated <span class=\"customMeta\" data-dictid=\"f3739d892c1692777184b2e134615c\">circulatory</span> <span class=\"customMeta\" data-dictid=\"9d02a99d051692777194aa3375023b\">overload</span> (TACO)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Delayed <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> reaction</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Management</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Stop transfusion, manage symptoms</li>\n<li>Supportive care (e.g., antipyretics, oxygen)</li>\n</ul>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Monitor for worsening anaemia and hemolysis.</li>\n<li>Consider further <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> support if indicated</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is defined as a massive blood transfusion?", "options": [{"label": "A", "text": "Replacement of whole blood volume within 12 hours", "correct": false}, {"label": "B", "text": "Replacement of whole blood volume within 48 hours", "correct": false}, {"label": "C", "text": "Replacement of whole blood volume within 24 hours", "correct": true}, {"label": "D", "text": "Replacement of whole blood volume within 4 hours", "correct": false}], "correct_answer": "C. Replacement of whole blood volume within 24 hours", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are complications of massive blood transfusion except?", "options": [{"label": "A", "text": "Metabolic Alkalosis", "correct": false}, {"label": "B", "text": "Metabolic Acidosis", "correct": true}, {"label": "C", "text": "Hyperkalemia", "correct": false}, {"label": "D", "text": "Hypocalcemia", "correct": false}], "correct_answer": "B. Metabolic Acidosis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a characteristic feature of Transfusion-Related Acute Lung Injury (TRALI)?", "options": [{"label": "A", "text": "Non-cardiogenic pulmonary edema within 6 hours of transfusion", "correct": true}, {"label": "B", "text": "Cardiogenic pulmonary edema within 24 hours of transfusion", "correct": false}, {"label": "C", "text": "Acute onset of fever and chills without respiratory symptoms", "correct": false}, {"label": "D", "text": "Gradual onset of jaundice and anemia several days after transfusion", "correct": false}], "correct_answer": "A. Non-cardiogenic pulmonary edema within 6 hours of transfusion", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 21 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 28-year-old woman with a known history of beta-thalassemia undergoes a blood transfusion. During the transfusion, she develops symptoms of anxiety, hypotension, and fever. What is the next appropriate step in the management of this patient?", "options": [{"label": "A", "text": "Stop the blood transfusion and restart after stabilization", "correct": true}, {"label": "B", "text": "Continue the blood transfusion and perform an ECG", "correct": false}, {"label": "C", "text": "Investigate for clerical errors in the blood transfusion process", "correct": false}, {"label": "D", "text": "Administer corticosteroids and monitor vital signs", "correct": false}], "correct_answer": "A. Stop the blood transfusion and restart after stabilization", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Immediate <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> Reactions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Delayed <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> Reactions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Onset Time</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Within hours of transfusion</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Days to weeks after transfusion</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Cause</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Immunologic reactions, <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> or non-hemolytic</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Immune-mediated, often involving minor <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> sensitization</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Presentation </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Fever, chills, Dyspnea (TRALI, TACO), <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> <span class=\"customMeta\" data-dictid=\"afafb9026e1692777186e3dd168fa8\">distress</span> (TRALI), Pulmonary oedema (TACO), hypothermia, <span class=\"customMeta\" data-dictid=\"2e0552462e16927771871413861fb7\">electrolyte</span> abnormalities, coagulopathy, acid-base disorders and hyperkalemia</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Fever, jaundice, Gradual decline in haemoglobin levels (hemolysis)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Severity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Can range from mild to life-threatening</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Generally less severe than immediate reactions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Examples</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Febrile non-hemolytic reaction (FNHTR)</li>\n<li>Transfusion-related <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> lung injury (TRALI)</li>\n<li>Transfusion-associated <span class=\"customMeta\" data-dictid=\"f3739d892c1692777184b2e134615c\">circulatory</span> <span class=\"customMeta\" data-dictid=\"9d02a99d051692777194aa3375023b\">overload</span> (TACO)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Delayed <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> reaction</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Blood transfusion requires screening of donor blood for all of the following infections except:", "options": [{"label": "A", "text": "Hepatitis C virus", "correct": false}, {"label": "B", "text": "Dengue virus", "correct": true}, {"label": "C", "text": "HIV virus", "correct": false}, {"label": "D", "text": "Hepatitis B virus", "correct": false}], "correct_answer": "B. Dengue virus", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:646px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Viral</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bacterial</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parasites</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Others</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hepatitis (A, B, C, G)</strong></p>\n<p><strong>HIV (I & II)</strong></p>\n<p>HTLV (I & II)</p>\n<p>CMV</p>\n<p>EBV</p>\n<p>Parvovirus B19</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Syphilis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Malaria</p>\n<p>Babesiosis</p>\n<p>Trypanosoma cruzi</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Creutzfeldt-<br/>\n\t\t\tJakob disease</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient has been brought with severe bleeding to your ER. His blood group is unknown. Fresh frozen plasma from which of the following blood groups can be given?", "options": [{"label": "A", "text": "O", "correct": false}, {"label": "B", "text": "AB", "correct": true}, {"label": "C", "text": "B", "correct": false}, {"label": "D", "text": "A", "correct": false}], "correct_answer": "B. AB", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:654px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Properties</strong></p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ABO system</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rh system</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Blood groups</strong></p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A, B, AB, and O</p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rh-positive & negative</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genetic loci</strong></p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>On <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 9</p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>On <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 1</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ag and Ab</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Group</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antigen</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antibody</strong></p>\n</td>\n<td colspan=\"2\" rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>C, c, D, E, & e antigens.</li>\n<li>‘d’ indicates the absence of D.</li>\n<li>Most important: Anti-D antibody.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>O</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anti-A & anti-B</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anti-B</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anti-A</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AB</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A & B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antigens also seen on/in</strong></p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endothelial & epithelial cells, plasma, saliva, and <span class=\"customMeta\" data-dictid=\"613e5acf29169277719839af208a78\">semen</span> (not seen in CSF)</p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No other cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type of Ab</strong></p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IgM (naturally occurring).</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IgG (does not occur naturally).</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical significance</strong></p>\n</td>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anti-A & anti-B can cause severe <span class=\"customMeta\" data-dictid=\"837d6227d81692777190a063ea2cd4\">intravascular</span> haemolysis after <span class=\"customMeta\" data-dictid=\"10dcdd93561692777190d73418c5a7\">incompatible</span> transfusion.</li>\n<li>ABO-matching is required before the <span class=\"customMeta\" data-dictid=\"ee9f07b0a81692777200e416e4e5d7\">transplantation</span> of solid organs.</li>\n</ul>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rh -ve individuals make anti-D <span class=\"customMeta\" data-dictid=\"c087dfa48f1692777180b90ca2237f\">Ab</span> if:</p>\n<ul>\n<li>Transfused with Rh +ve blood.</li>\n<li>Rh -ve pregnant women are exposed to Rh +ve <span class=\"customMeta\" data-dictid=\"f375a3584316927772020efa386e3e\">fetal</span> RBCs that have <span class=\"customMeta\" data-dictid=\"6b4030e51a1692777185c6a9dc95b0\">crossed</span> the placenta.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following can be prevented by transfusing irradiated RBCs?", "options": [{"label": "A", "text": "Graft versus host disease", "correct": true}, {"label": "B", "text": "HLA alloimmunization", "correct": false}, {"label": "C", "text": "Immunomodulation", "correct": false}, {"label": "D", "text": "Nonhemolytic Febrile Transfusion Reactions", "correct": false}], "correct_answer": "A. Graft versus host disease", "question_images": [], "explanation_images": [], "explanation": "<table align=\"left\" cellspacing=\"0\" style=\"border-collapse:collapse; width:673px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Steps for Production of <span class=\"customMeta\" data-dictid=\"248111ded81692777197946454db52\">Red Blood Cell</span> Concentrates (RBCC) from Whole Blood</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Whole Blood Collection</strong></p>\n<ul>\n<li>Blood is drawn into <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> bags with anticoagulants to prevent clotting. Each unit contains 450-500 mL. (First 20-30 ml is discarded due to skin <span class=\"customMeta\" data-dictid=\"0af84af4761692777202fbf6914573\">flora</span> contamination)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Slow Speed <span class=\"customMeta\" data-dictid=\"af7c8043d01692777184863feb6c5f\">Centrifugation</span> (Soft Spin)</strong></p>\n<ul>\n<li>Separates <span class=\"customMeta\" data-dictid=\"248111ded81692777197946454db52\">Red Blood Cell</span> Concentrate (RBCC) at the bottom and Platelet-Rich <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">Plasma</span> (PRP) at the top, with the <span class=\"customMeta\" data-dictid=\"353a9bd0c61692777183ec2414d977\">buffy</span> coat (white blood cells) in between.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>RBCC Processing and <span class=\"customMeta\" data-dictid=\"8fabe131a916927771802a448a329c\">Additive</span> Solutions</strong></p>\n<ul>\n<li>After removing <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> and <span class=\"customMeta\" data-dictid=\"353a9bd0c61692777183ec2414d977\">buffy</span> coat, <strong>additive solutions like SAGM (Saline, Adenine, Glucose, Mannitol) or <span class=\"customMeta\" data-dictid=\"ff21381a7a1692777185cb873396da\">CPD</span> are added to preserve cell <span class=\"customMeta\" data-dictid=\"a8dece102f16927772026b199f06af\">viability</span> and extend shelf life.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Leukoreduction/ Deleucocytation</strong></p>\n<p>Achieved by filtering RBCC to remove >99.9% of white blood cells.</p>\n<p><strong>Purpose:</strong></p>\n<ul>\n<li>Nonhemolytic <span class=\"customMeta\" data-dictid=\"e57922b3c91692777202151895d37e\">Febrile</span> <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> Reactions <strong>(NHFTRs)</strong>. <strong>(Option D ruled out)</strong></li>\n<li><strong>Alloimmunization</strong> and <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> refractoriness. <strong>(Option B ruled out)</strong></li>\n<li>Transfusion-transmitted infections, such as <strong>cytomegalovirus</strong> (CMV).</li>\n<li><strong>Immunomodulation </strong>risks from transfusions <strong>(Option C ruled out)</strong></li>\n</ul>\n<p> </p>\n<p>Post-reduction <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> content: <1–5 x 10⁶ leukocytes/unit.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>5</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Irradiation (Optional)</strong></p>\n<ul>\n<li>RBCC is irradiated with <span class=\"customMeta\" data-dictid=\"6fda63a90c1692777202563d33a81b\">X-rays</span> or <span class=\"customMeta\" data-dictid=\"49be0416121692777188dc8944b7bc\">gamma</span> rays (25–35 Gy).</li>\n<li><strong>Purpose: </strong>Prevents graft-versus-host disease (GVHD) by inactivating donor lymphocytes.<strong>(Option A)</strong></li>\n<li><strong>Use:</strong> RBCC must be transfused within 24 hours post-irradiation.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>6</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Plasma Reduction (Optional)</strong></p>\n<ul>\n<li>Plasma proteins are removed to prevent allergic or anaphylactic reactions.</li>\n</ul>\n<p><strong>Purpose: </strong>Useful for patients with a history of allergic <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> reactions, reducing post-transfusion <span class=\"customMeta\" data-dictid=\"d6d717efa216927771819fee139235\">anaphylaxis</span> risk.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>7</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cryopreservation (Optional)</strong></p>\n<ul>\n<li>RBCC is cryopreserved at -80°C, mainly for rare blood types.</li>\n</ul>\n<p><strong>Purpose: </strong>Extends shelf life up to 30 years, increasing availability of rare blood groups.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 24-year-old man, after being involved in a road traffic accident (RTA), was brought to the casualty 6 hours later. His B.P. was 90/60 mm Hg, heart rate was 110/min, and SpO2 was 92%. A blood transfusion was administered. A few hours later, the patient becomes febrile and tachypneic and starts bleeding from the IV and NG tube sites. His SpO2 levels begin to drop. What is the likely cause?", "options": [{"label": "A", "text": "Transfusion reaction", "correct": true}, {"label": "B", "text": "Acute adrenal crisis", "correct": false}, {"label": "C", "text": "Fat embolism", "correct": false}, {"label": "D", "text": "Hemorrhagic shock", "correct": false}], "correct_answer": "A. Transfusion reaction", "question_images": [], "explanation_images": [], "explanation": "<table align=\"left\" cellspacing=\"0\" style=\"border-collapse:collapse; width:625px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Types of <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> reactions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none; vertical-align:bottom\">\n<p><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none; vertical-align:bottom\">\n<p><strong>Immediate <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> Reactions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none; vertical-align:bottom\">\n<p><strong>Delayed <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">Transfusion</span> Reactions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p><strong>Onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Within hours of transfusion</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Days to weeks after transfusion</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p><strong>Cause</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Immunologic reactions, <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> or non-hemolytic</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Immune-mediated, often involving minor <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> sensitization</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p><strong>Presentation </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p><strong>Fever, chills, <span class=\"customMeta\" data-dictid=\"c92aa64edb16927771867805a38cc6\">dyspnea</span> </strong>(TRALI, TACO), <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> <span class=\"customMeta\" data-dictid=\"afafb9026e1692777186e3dd168fa8\">distress</span> (TRALI), <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">Pulmonary</span> oedema (TACO), hypothermia, <span class=\"customMeta\" data-dictid=\"2e0552462e16927771871413861fb7\">electrolyte</span> abnormalities, <strong>coagulopathy</strong>, acid-base disorders and hyperkalemia.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Fever, jaundice, gradual decline in haemoglobin levels (hemolysis).</p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p><strong>Severity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Can range from mild to life-threatening.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Generally less severe than immediate reactions.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p><strong>Examples</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Febrile non-hemolytic reaction (FNHTR)</li>\n<li>Transfusion-related <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> lung injury (TRALI)</li>\n<li>Transfusion-associated <span class=\"customMeta\" data-dictid=\"f3739d892c1692777184b2e134615c\">circulatory</span> <span class=\"customMeta\" data-dictid=\"9d02a99d051692777194aa3375023b\">overload</span> (TACO)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Delayed <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> reaction</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p><strong>Management</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Stop <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> and manage symptoms.</li>\n<li>Supportive care (e.g., antipyretics, oxygen).</li>\n</ul>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:none; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Monitor for worsening anaemia and hemolysis.</li>\n<li>Consider further <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> support if indicated.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Why is blood stored in citrate-phosphate-dextrose (CPD) preferred over acid-citrate-dextrose (ACD) for hypoxic patients?", "options": [{"label": "A", "text": "It has less P50", "correct": false}, {"label": "B", "text": "It is less acidic", "correct": false}, {"label": "C", "text": "The fall in 2,3-DPG is less", "correct": true}, {"label": "D", "text": "None of the above", "correct": false}], "correct_answer": "C. The fall in 2,3-DPG is less", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 16 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A patient who presents with a painful, progressively enlarging growth from her left upper tibia is suspected to have chondrosarcoma and subjected to a biopsy and examination. The report states, “presence of osteoclast-type giant cells with intralesional bone formation”. Which of the following types of chondrosarcoma does this patient have?", "options": [{"label": "A", "text": "Conventional", "correct": false}, {"label": "B", "text": "Mesenchymal", "correct": false}, {"label": "C", "text": "Clear cell", "correct": true}, {"label": "D", "text": "Dedifferentiated", "correct": false}], "correct_answer": "C. Clear cell", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/CTff8LFRvo3RAEjtCt4u1736927676.png", "https://image.prepladder.com/content/fA5N9pR2dXhcy5xbcBDf1736927565.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Conventional (Option 1)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dedifferentiated (Option 4)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neoplastic <span class=\"customMeta\" data-dictid=\"c6f61cdbe41692777183fdc8f95f96\">cartilage</span> infiltrates the <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> space and surrounds the pre-existing bony trabeculae.</p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low-grade chondrosarcoma</p>\n<p>with a second, <span class=\"customMeta\" data-dictid=\"ffb779b5ad1692777189091a0aef76\">high-grade</span> component that does not produce cartilage.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clear-cell (Option 3)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mesenchymal (Option 2)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It contains sheets of large, <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> chondrocytes with abundant clear cytoplasm, numerous osteoclast-type giant cells, and <span class=\"customMeta\" data-dictid=\"e572b487a11692777190b9f3b05fd3\">intralesional</span> bone formation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Composed of islands of well-differentiated <span class=\"customMeta\" data-dictid=\"a2ce88e8a0169277718988f5bc31b8\">hyaline</span> <span class=\"customMeta\" data-dictid=\"c6f61cdbe41692777183fdc8f95f96\">cartilage</span> surrounded by sheets of <span class=\"customMeta\" data-dictid=\"6d6e7d903b169277719662541dd5e2\">primitive</span> appearing small round cells.</p>\n<br/>\n\t\t\t </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the tumours in column A to their genetic alterations in Column B Tumor Translocation A) Ewing's Sarcoma 1) t(x;18) B) Rhabdomyosarcoma 2) t(12;16) C) Liposarcoma 3) t(1;13) D) Synovial Sarcoma 4) t(11;22)", "options": [{"label": "A", "text": "A-4, B-2, C-3, D-1", "correct": false}, {"label": "B", "text": "A-4, B-3,C-1, D-2", "correct": false}, {"label": "C", "text": "A-4, B-3, C-2, D-1", "correct": true}, {"label": "D", "text": "A-3, B-4, C-1, D-2", "correct": false}], "correct_answer": "C. A-4, B-3, C-2, D-1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Translocation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ewing's Sarcoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>t(11;22)</li>\n<li>Fusion of the EWSR1 gene on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 22 with the FLI1 gene on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 11 leads to oncogenesis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rhabdomyosarcoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>t(1;13)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Liposarcoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>t(12;16)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Synovial Sarcoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>t(x;18)</li>\n<li>The <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> of the SS18 gene on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 18 with the SSX gene on the X-chromosome promotes <span class=\"customMeta\" data-dictid=\"a4b1eb3c9b1692777194c3a119d72f\">oncogenic</span> transformation.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/zNlcT0C1A8hN9WwHGc2s1746478546.mp3", "video": ""}, {"text": "A 55-year-old male, presents with a sudden onset of severe pain, redness, and swelling in his right big toe. The right big toe is red, swollen, and extremely tender to touch. There is no fever or other systemic symptoms. He enjoys red meat and seafood, and he drinks alcholol regularly. All of the following are true about his diagnosis except?", "options": [{"label": "A", "text": "Deposition of monosodium urate crystals in joints.", "correct": false}, {"label": "B", "text": "Thiazide diuretics can precipitate attacks.", "correct": false}, {"label": "C", "text": "Rhomboid-shaped, weakly positively birefringent under polarised light confirms the diagnosis.", "correct": true}, {"label": "D", "text": "Elevated uric acid levels.", "correct": false}], "correct_answer": "C. Rhomboid-shaped, weakly positively birefringent under polarised light confirms the diagnosis.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/jaR0Sww3Q9clMOHJ7rny1736928972.png", "https://image.prepladder.com/content/qdz9eRZ8G4IVeu0kd6Gc1736928993.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Gout</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Pseudogout</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Aetiology</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Deposition of monosodium <span class=\"customMeta\" data-dictid=\"41d0fc680516927772019afa9472e5\">urate</span> (MSU) crystals</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Deposition of <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> <span class=\"customMeta\" data-dictid=\"53da8f40b5169277719620504e0cb9\">pyrophosphate</span> <span class=\"customMeta\" data-dictid=\"168c514d4016927771861c453b7a5a\">dihydrate</span> (CPPD) crystals</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Commonly Affected Joints</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>First <span class=\"customMeta\" data-dictid=\"c7eec8acc51692777192539a955090\">metatarsophalangeal</span> joint (big toe), ankles, knees</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Knees, wrists, hips, shoulders, elbows</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Crystal Characteristics</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Needle-shaped, negatively birefringent under polarised light</p>\n<p><img alt=\"\" data-author=\"Mikael Haggstrom\" data-hash=\"\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Birefringence_microscopy_of_gout,_original.jpg\" data-tags=\"\" height=\"3149\" src=\"https://image.prepladder.com/content/jaR0Sww3Q9clMOHJ7rny1736928972.png\" width=\"3794\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Rhomboid-shaped, weakly positively birefringent under polarised light</strong> (Option 3)</p>\n<p><img alt=\"\" data-author=\"Mikael Haggstrom\" data-hash=\"\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Birefringence_microscopy_of_pseudogout,_annotated.jpg\" data-tags=\"\" height=\"3490\" src=\"https://image.prepladder.com/content/qdz9eRZ8G4IVeu0kd6Gc1736928993.png\" width=\"4168\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Serum Findings</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Elevated <span class=\"customMeta\" data-dictid=\"ffa20262931692777201caef35de16\">uric</span> acid levels</strong> (Option 4)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Often, normal <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> and <span class=\"customMeta\" data-dictid=\"bfea0730ac16927771959eb551740f\">phosphorus</span> levels</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Risk Factors</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>High <span class=\"customMeta\" data-dictid=\"c03d9c910716927771961a9a2609b5\">purine</span> diet, alcohol consumption, obesity, diuretics <strong>(thiazides & loop diuretics)</strong> (Option 2), genetic predisposition</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Age, joint trauma, <span class=\"customMeta\" data-dictid=\"5dda3cc2ab1692777202b3b3c65bea\">familial</span> predisposition, <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> disorders (e.g., hyperparathyroidism, hemochromatosis)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Acute Attack Presentation</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Sudden, severe pain, redness, swelling, and warmth in the affected joint</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Sudden, severe pain, redness, swelling, and warmth in the affected joint</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/wom7R4NYu9CSqvfALqbk1747308233.mp3", "video": ""}, {"text": "All of the following are true about rhabdomyosarcoma except?", "options": [{"label": "A", "text": "It is the most common soft tissue sarcoma in children.", "correct": false}, {"label": "B", "text": "Positive IHC staining for desmin and myogenin.", "correct": false}, {"label": "C", "text": "It commonly presents in the extremities of children and adolescents.", "correct": false}, {"label": "D", "text": "It has a benign clinical course and rarely metastasizes.", "correct": true}], "correct_answer": "D. It has a benign clinical course and rarely metastasizes.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/yW6JroPgYQ3kCkWmbfJ71736929090.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 38-year-old female presents with a 6-month history of heavy menstrual bleeding and a sensation of pelvic pressure. She reports that her periods have become increasingly heavy. There is no significant past medical history, and she is not currently on any medication.Ultrasound reveals a heterogeneous, hypoechoic mass within the uterus. A histology image is given below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Adenomyosis", "correct": false}, {"label": "B", "text": "Leiomyosarcoma", "correct": false}, {"label": "C", "text": "Endometrial carcinoma", "correct": false}, {"label": "D", "text": "Leiomyoma", "correct": true}], "correct_answer": "D. Leiomyoma", "question_images": ["https://image.prepladder.com/content/P61nEFX5NYpv4Ohr7hzZ1736928530.png"], "explanation_images": ["https://image.prepladder.com/content/hpOszCYBAPlp6tw1V0Ag1736928589.png", "https://image.prepladder.com/content/FurPZPs6YLdJY3kwo3SG1736928630.png", "https://image.prepladder.com/content/bRV3Pn9RK29uceBNyg5b1736928679.png", "https://image.prepladder.com/content/lUwT6JVEtmMT6wAVPUBp1736928714.png", "https://image.prepladder.com/content/5IcLakHYPDTSdUo1KMjE1736928814.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presented with an enlarging mass in his left thigh for the last three months. Physical examination revealed a non-tender, palpable mass with indistinct borders. He has a prior history of mass excision in the same location. A biopsy of the lesion is obtained. Based on the presentation, which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Lipoma", "correct": false}, {"label": "B", "text": "Liposarcoma", "correct": true}, {"label": "C", "text": "Leiomyosarcoma", "correct": false}, {"label": "D", "text": "Rhabdomyosarcoma", "correct": false}], "correct_answer": "B. Liposarcoma", "question_images": ["https://image.prepladder.com/content/rbWKEnEy252eUpEzOtZr1736928142.png"], "explanation_images": ["https://image.prepladder.com/content/q3pIA8FYwhg0CnzOds0f1736928203.png", "https://image.prepladder.com/content/ddk81I5trkcykWEThVG31736928234.png", "https://image.prepladder.com/content/YIBrerTArBS6EcOzL4bn1736928276.png", "https://image.prepladder.com/content/8rhoMyafGCtBj65NYmBM1736928318.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 17-year-old female presents with worsening pain in her right tibia over the past few months. On examination, there is tenderness and swelling over the proximal right tibia. Biopsy results show blood-filled cystic spaces lined by fibrous septa containing giant cells. All the following statements are true regarding this condition except?", "options": [{"label": "A", "text": "Characterised by uniloculated blood-filled spaces with eggshell appearance on x-ray.", "correct": true}, {"label": "B", "text": "Often aggressively growing and are frequently discovered in vertebral bodies.", "correct": false}, {"label": "C", "text": "Majority cases are found associated with USP6 gene involvement in chromosome 17", "correct": false}, {"label": "D", "text": "Nearly one third patients have a distinctive basophilic metaplastic matrix known as blue bone", "correct": false}], "correct_answer": "A. Characterised by uniloculated blood-filled spaces with eggshell appearance on x-ray.", "question_images": ["https://image.prepladder.com/content/pCSWj23dtoemQb92rxRS1736928055.png"], "explanation_images": ["https://image.prepladder.com/content/nKAoFQHh9u0mek6mhkER1736928067.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 14-year-old male presents with left knee pain for several months. Physical examination reveals tenderness and X-ray demonstrates metaphyseal lesion of the distal femur. A biopsy image of the lesion is shown. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Chondrosarcoma", "correct": false}, {"label": "B", "text": "Ewing sarcoma", "correct": false}, {"label": "C", "text": "Non-ossifying fibroma", "correct": true}, {"label": "D", "text": "Giant cell tumor of bone", "correct": false}], "correct_answer": "C. Non-ossifying fibroma", "question_images": ["https://image.prepladder.com/content/ha1MSyBb3WaQbIVtoFlC1736927946.png"], "explanation_images": ["https://image.prepladder.com/content/7QUJ18tFjtIwwVkxcpZy1736927986.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements are true regarding fibrous dysplasia? It is a malignant tumour with components of normal bone unable to differentiate into mature structures Associated with CSF 1 R gene mutation and soft tissue myxoma. Typically occurs in older individuals causing bones to become weak and easily fractured. Histopathological examination shows woven bone trabeculae with disorganised growth plates. Females commonly presents with precocious puberty and irregular dark skin lesions.", "options": [{"label": "A", "text": "1, 3 and 4", "correct": false}, {"label": "B", "text": "2, 3 and 5", "correct": false}, {"label": "C", "text": "3, 4 and 5", "correct": false}, {"label": "D", "text": "4 and 5", "correct": true}], "correct_answer": "D. 4 and 5", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/pFpGXMJ7s6DXkzk54T1h1736927887.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old male presents with worsening lower back pain and difficulty walking for the last few months. Molecular analysis revealed brachyury gene expression. A biopsy image of the lesion is shown. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Chordoma", "correct": true}, {"label": "B", "text": "Enchondroma", "correct": false}, {"label": "C", "text": "Ewing sarcoma", "correct": false}, {"label": "D", "text": "Chondrosarcoma", "correct": false}], "correct_answer": "A. Chordoma", "question_images": ["https://image.prepladder.com/content/1aROqO19W0beM4IlBdtM1736927744.png"], "explanation_images": ["https://image.prepladder.com/content/m39NEKIWwwjrnFLgEjKr1736927798.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding normal bone and bone marrow are true? 1. Bone marrow contains a rich network of blood vessels, nerves, and lymphatics, supporting its role as a hematopoietic organ. 2. Osteoblasts are responsible for bone formation, while osteoclasts are involved in bone resorption. 3. Hematopoietic stem cells in the bone marrow give rise to some blood cell lineages. 4. Bone marrow lacks hematopoietic elements and serves primarily as a site for fat storage. 5. Bone remodelling is solely regulated by hormonal factors.", "options": [{"label": "A", "text": "Statements 1 and 2 are correct", "correct": true}, {"label": "B", "text": "Statements 3 and 4 are correct", "correct": false}, {"label": "C", "text": "Statements 4 and 5 are correct", "correct": false}, {"label": "D", "text": "Statements 1 and 5 are correct", "correct": false}], "correct_answer": "A. Statements 1 and 2 are correct", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Statement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Explanation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1. <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">Bone marrow</span> contains a rich network of blood vessels, nerves, and lymphatics, supporting its role as a <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">hematopoietic</span> organ.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> is <strong>highly vascularised</strong> and <strong>innervated</strong>, providing the necessary <span class=\"customMeta\" data-dictid=\"af448f25421692777192843ae96855\">microenvironment</span> for <strong>hematopoiesis</strong> and <strong>immune function.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2. Osteoblasts are responsible for bone formation, while osteoclasts are involved in bone resorption.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Osteoblasts are <strong>bone-forming cells</strong>, while osteoclasts are responsible for <strong>bone</strong> <strong>resorption</strong>, leading to bone remodelling and maintenance of bone density.</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Statement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Correct Explanation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3. <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">Hematopoietic</span> stem cells in the <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> give rise to some cell lineages</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hematopoietic stem cells <strong>give rise to all blood cell lineages</strong>, not just some.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4. <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">Bone marrow</span> lacks <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">hematopoietic</span> elements and serves primarily as a site for fat storage.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> is a <strong>major site for hematopoiesis</strong>, where blood cells are produced. While <strong>some <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> does contain adipocytes for fat storage</strong>, this is <strong>not its primary function.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>5. Bone remodelling is solely regulated by mechanical stress and does not involve hormonal regulation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mechanical stress</strong> and <strong>hormonal factors, </strong>both regulate bone remodelling, including <span class=\"customMeta\" data-dictid=\"3bcd005ca116927771941ae5bca4a8\">parathyroid</span> hormone (PTH) and calcitonin. Hormonal regulation plays a significant role in maintaining bone homeostasis.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is incorrect about enchondromas?", "options": [{"label": "A", "text": "Maffucci syndrome can also co-exist with brain glioma.", "correct": false}, {"label": "B", "text": "Mutations in isocitrate dehydrogenase enzyme genes are common.", "correct": false}, {"label": "C", "text": "Histology shows hyaline cartilage encased by reactive bone.", "correct": false}, {"label": "D", "text": "Ollier's disease presents as solitary juxta-cortical enchondromas.", "correct": true}], "correct_answer": "D. Ollier's disease presents as solitary juxta-cortical enchondromas.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Qflc4Ad7gNsFbieBAnkz1736927328.png", "https://image.prepladder.com/content/PcCmJ6H2JhfoqqQLEPb71736927393.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 14-year-old boy presents with a swelling on his left tibia. An X-ray of the leg shows a destructive process with indistinct borders and an onion-skin pattern of the periosteal bone. A biopsy was performed, as shown in the image below. Identify the true statements regarding this condition. It is a malignant tumour characterised by primitive round cells with obvious differentiation. It affects boys more than girls. More than 90% of the cases are caused due to t(11;22)(q24;q12) mutation. The presence of rounded cell clusters with a central fibrillary core indicates neuroectodermal differentiation. Chemotherapy-induced necrosis is a negative prognostic indicator.", "options": [{"label": "A", "text": "1, 2, 3", "correct": false}, {"label": "B", "text": "2, 3, 4", "correct": true}, {"label": "C", "text": "1, 3", "correct": false}, {"label": "D", "text": "3, 4, 5", "correct": false}], "correct_answer": "B. 2, 3, 4", "question_images": ["https://image.prepladder.com/notes/bVyM3yqTDHvHRJ9tR79E1731512738.png"], "explanation_images": ["https://image.prepladder.com/content/EsiudlI4HWQzqufbmN0q1736927243.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Histopathological examination of a lesion arising from the right distal femur is given as the image below with such characteristic cells. Which of the following is the most probable diagnosis?", "options": [{"label": "A", "text": "Osteoclastoma", "correct": true}, {"label": "B", "text": "Chondrosarcoma", "correct": false}, {"label": "C", "text": "Osteochondroma", "correct": false}, {"label": "D", "text": "Ewing’s sarcoma", "correct": false}], "correct_answer": "A. Osteoclastoma", "question_images": ["https://image.prepladder.com/notes/xFj7waJ9FKNP2G75TnNB1731512437.png"], "explanation_images": ["https://image.prepladder.com/content/60CAvyeDtO9Uxsjt4E2d1736926554.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/aeTmCuwEiFqzj5GcCJ971747819579.mp3", "video": ""}, {"text": "A patient presented with a hard mass over the right tibia, and subsequent imaging revealed the presence of sessile growth in the bone. Biopsy is done later, which shows the presence of “cartilage cap” over the lesion. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Osteochondroma", "correct": true}, {"label": "B", "text": "Chondroblastoma", "correct": false}, {"label": "C", "text": "Enchondroma", "correct": false}, {"label": "D", "text": "Chondrosarcoma", "correct": false}], "correct_answer": "A. Osteochondroma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/JmX39kjAEV5lv6zAOcf61736927090.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 15-year-old male presents with persistent knee pain and swelling of two months duration. The pain is severe at night and not relieved by NSAIDs. A biopsy was performed, and it showed pleomorphism, large hyperchromatic nuclei, and bizarre giant cells producing unmineralised osteoid. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Osteoid osteoma", "correct": false}, {"label": "B", "text": "Osteoblastoma", "correct": false}, {"label": "C", "text": "Osteosarcoma", "correct": true}, {"label": "D", "text": "Osteoclastoma", "correct": false}], "correct_answer": "C. Osteosarcoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/YkoKVliyZZPmo74rBfJy1736926859.png", "https://image.prepladder.com/notes/4QebK0zAHRDtMQogSycU1743336063.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old male presents with persistent pain in his right leg that worsens at night and is partially relieved by nonsteroidal anti-inflammatory drugs (NSAIDs). Imaging is given below. Based on the clinical presentation and imaging findings, which of the following is incorrect regarding this condition?", "options": [{"label": "A", "text": "It has a predilection for the appendicular skeleton.", "correct": false}, {"label": "B", "text": "It is less than 2 cm in diameter.", "correct": false}, {"label": "C", "text": "It commonly affects the axial skeleton", "correct": true}, {"label": "D", "text": "Pain is relieved on taking aspirin", "correct": false}], "correct_answer": "C. It commonly affects the axial skeleton", "question_images": ["https://image.prepladder.com/content/sHZNBnwLW74cLJM1cZec1738316672.png"], "explanation_images": ["https://image.prepladder.com/content/c5HBQxdCXqxtBMaFFWND1732629397.png", "https://image.prepladder.com/content/kWaRZAhGzcOT9olO5vVt1736926388.png", "https://image.prepladder.com/notes/AxjnqbM3iMGBPeYsTH1R1731500990.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Osteoid Osteoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Osteoblastoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Size</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less than 2 cm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More than 2 cm</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Site</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Femur or Tibia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Spine</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pain</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nocturnal pain</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dull pain</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>On treatment</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Relieved about taking aspirin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Not relieved on taking aspirin</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">Imaging</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"306\" src=\"https://image.prepladder.com/content/c5HBQxdCXqxtBMaFFWND1732629397.png\" width=\"300\"/></td>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top\"><img alt=\"\" data-author=\"S. Mujagić, Maida Kuljanin, Asmir Hrustić\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.semanticscholar.org/paper/A-spinal-osteoblastoma-in-a-child%2C-situated-in-the-Mujagi%C4%87-Kuljanin/fb2ee5bdfa577840cc1364352c0f8f3a6a220a65\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/kWaRZAhGzcOT9olO5vVt1736926388.png\" width=\"3310\"/></td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are associated with Gardner’s syndrome except?", "options": [{"label": "A", "text": "Multiple osteoma", "correct": false}, {"label": "B", "text": "Colon polyps with risk of malignancy", "correct": false}, {"label": "C", "text": "Enchondroma", "correct": true}, {"label": "D", "text": "Supernumerary teeth", "correct": false}], "correct_answer": "C. Enchondroma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ps7vbfu6Mk5eo542wW2s1736926785.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a metaphyseal tumour?", "options": [{"label": "A", "text": "Osteosarcoma", "correct": false}, {"label": "B", "text": "Fibrous dysplasia", "correct": false}, {"label": "C", "text": "Giant cell tumour of the bone", "correct": true}, {"label": "D", "text": "Aneurysmal bone cyst", "correct": false}], "correct_answer": "C. Giant cell tumour of the bone", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Epiphyseal tumours</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Metaphyseal tumours</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diaphyseal tumours</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Giant cell tumour (GCT).</li>\n<li>Chondroblastoma.</li>\n<li>Clear cell chondrosarcoma.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Simple bone cyst.</li>\n<li>Osteosarcoma.</li>\n<li>Fibrous dysplasia.</li>\n<li>Aneurysmal bone cyst.</li>\n<li>Osteochondroma.</li>\n<li>Chondrosarcoma</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Multiple myeloma.</li>\n<li>Adamantinoma.</li>\n<li>.</li>\n<li>Ewing's Sarcoma.</li>\n<li>Osteoid Osteoma.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-year-old boy presents with a history of frequent fractures, bone pain, and difficulty walking. On examination, he has short stature and cranial nerve palsies. The radiograph is revealed below. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Osteogenesis imperfecta", "correct": false}, {"label": "B", "text": "Osteopetrosis", "correct": true}, {"label": "C", "text": "Rickets", "correct": false}, {"label": "D", "text": "Paget disease of the bone", "correct": false}], "correct_answer": "B. Osteopetrosis", "question_images": ["https://image.prepladder.com/content/ughamMQSmVLWPt0QFryz1736923259.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 30 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which HLA is associated with Reiter syndrome?", "options": [{"label": "A", "text": "HLA-DR3", "correct": false}, {"label": "B", "text": "HLA-B27", "correct": true}, {"label": "C", "text": "HLA-DQ8", "correct": false}, {"label": "D", "text": "HLA- DR4", "correct": false}], "correct_answer": "B. HLA-B27", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 15-year-old boy presents with swelling in the upper diaphyseal part of the tibia. X-ray of the swelling showed a periosteal reaction. A histopathological image of the biopsy is given below. Immunohistochemistry was positive for synaptophysin and MIC2. What is the likely diagnosis?", "options": [{"label": "A", "text": "Osteosarcoma", "correct": false}, {"label": "B", "text": "Ewing sarcoma", "correct": true}, {"label": "C", "text": "Metastatic neuroblastoma", "correct": false}, {"label": "D", "text": "Osteoclastoma", "correct": false}], "correct_answer": "B. Ewing sarcoma", "question_images": ["https://image.prepladder.com/notes/SY3wTWJbxfQ7yqlN0O6f1745246157.png"], "explanation_images": ["https://image.prepladder.com/notes/SY3wTWJbxfQ7yqlN0O6f1745246157.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Epiphyseal tumours</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Metaphyseal tumours</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diaphyseal tumours</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Osteoclastoma/ Giant cell tumor (GCT)</li>\n<li>Chondroblastoma.</li>\n<li>Clear cell chondrosarcoma.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Simple bone cyst.</li>\n<li>Osteosarcoma.</li>\n<li>Fibrous dysplasia.</li>\n<li>Aneurysmal bone cyst.</li>\n<li>Osteochondroma.</li>\n<li>Chondrosarcoma</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Multiple myeloma.</li>\n<li>Adamantinoma.</li>\n<li><strong>Ewing's Sarcoma.</strong></li>\n<li>Osteoid Osteoma.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old woman has been experiencing left knee pain for one month. The knee is tender to touch, and an X-ray reveals a 5cm mass in the distal femoral epiphysis with a \"soap bubble\" appearance. Microscopy findings are provided below. What is the likely diagnosis?", "options": [{"label": "A", "text": "Chondroblastoma", "correct": false}, {"label": "B", "text": "Osteoclastoma", "correct": true}, {"label": "C", "text": "Osteosarcoma", "correct": false}, {"label": "D", "text": "Osteochondroma", "correct": false}], "correct_answer": "B. Osteoclastoma", "question_images": ["https://image.prepladder.com/content/T83Lh8ZWvSsf9ibJG0JF1746084170.png"], "explanation_images": ["https://image.prepladder.com/content/8Gb9FLRg7ZdHlEhYxoh81747908659.png", "https://image.prepladder.com/content/C1EdIbxYKwTT70D1htth1747922328.png", "https://image.prepladder.com/content/GIX4cwo81BKr3GFjnTYm1746084273.png", "https://image.prepladder.com/content/lM41pZgm2HLtEjx72Dmc1747908669.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A woman who had undergone total knee replacement surgery comes back with complaints of knee pain and loosening of implants. The following histopathological slide was obtained, showing foreign body giant cells and the appearance highlighted in the image below. What is your diagnosis?", "options": [{"label": "A", "text": "Ochronosis", "correct": false}, {"label": "B", "text": "Metallosis", "correct": true}, {"label": "C", "text": "Malignant melanoma", "correct": false}, {"label": "D", "text": "Rosai-Dorfman disease", "correct": false}], "correct_answer": "B. Metallosis", "question_images": ["https://image.prepladder.com/notes/Txqz5bp8cAtOEuTzcMQi1746606455.png"], "explanation_images": ["https://image.prepladder.com/notes/8JnMTDoW3XMvuIYM2PfX1746606504.png", "https://image.prepladder.com/notes/26qU3SpLSUJTLg1SRMyo1746606733.png", "https://image.prepladder.com/notes/UgxpttJlFt1UKz8AJVfx1746606637.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions will have the least chance of a dry bone marrow aspiration?", "options": [{"label": "A", "text": "Hairy cell leukemia", "correct": false}, {"label": "B", "text": "Acute myeloid leukemia (AML)", "correct": false}, {"label": "C", "text": "Myelodysplastic syndrome", "correct": false}, {"label": "D", "text": "Follicular lymphoma", "correct": true}], "correct_answer": "D. Follicular lymphoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/RruUpM4DRtFpNUrD2wjG1746607974.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 15 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "The terminal duct lobular unit (TDLU) is the functional unit of the breast. Which of the following is not a part of the TDLU?", "options": [{"label": "A", "text": "Intralobular terminal duct", "correct": false}, {"label": "B", "text": "Extralobular terminal duct", "correct": false}, {"label": "C", "text": "Lactiferous duct", "correct": true}, {"label": "D", "text": "Ductules", "correct": false}], "correct_answer": "C. Lactiferous duct", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tMw3PQ3rMOvKuFWx3neZ1737513605.png", "https://image.prepladder.com/content/Pn4P4D3kg91qj9xmNr291737513656.png"], "explanation": "\n<p><strong>References:</strong></p>\n<ul><li>↳ Terminal duct lobular unit | Radiology Reference Article | Radiopaedia.org</li></u\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 24-year-old with a 2-month-old infant presents to the OPD with pain in her left breast. The baby is exclusively breastfed. On examination, the nipple is tender and erythematous with a fluctuant mass beneath the areola. Which of the following is the most common cause of this condition?", "options": [{"label": "A", "text": "Pseudomonas aeruginosa", "correct": false}, {"label": "B", "text": "Staphylococcus aureus", "correct": true}, {"label": "C", "text": "Streptococcus sp.", "correct": false}, {"label": "D", "text": "Listeria monocytogenes", "correct": false}], "correct_answer": "B. Staphylococcus aureus", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 48-year-old woman presents with pain in her left breast and associated nipple discharge for the past few weeks. She denies any fever, chills, or recent lactation. On examination, a small ovoid, well-defined subareolar mass is felt. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute mastitis", "correct": false}, {"label": "B", "text": "Duct ectasia", "correct": true}, {"label": "C", "text": "Ductal carcinoma in situ", "correct": false}, {"label": "D", "text": "Fibroadenoma", "correct": false}], "correct_answer": "B. Duct ectasia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/8xWAxZ1jdSURWiqsHcmz1737513908.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding Zuska’s disease is incorrect?", "options": [{"label": "A", "text": "There is squamous metaplasia of the lactiferous duct", "correct": false}, {"label": "B", "text": "Characterized by the formation of keratin plug", "correct": false}, {"label": "C", "text": "Presents as subareolar abscess", "correct": false}, {"label": "D", "text": "Alcohol is a risk factor", "correct": true}], "correct_answer": "D. Alcohol is a risk factor", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/JizYxiAef0d49CLIdsmE1737515218.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions is most likely to cause a sticky, green, or black discharge from the nipple?", "options": [{"label": "A", "text": "Duct Papilloma", "correct": false}, {"label": "B", "text": "Paget's Disease", "correct": false}, {"label": "C", "text": "Duct Ectasia", "correct": true}, {"label": "D", "text": "Breast Cancer", "correct": false}], "correct_answer": "C. Duct Ectasia", "question_images": [], "explanation_images": [], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:566px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Discharge Colour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Disorders</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Clear or Milky</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Hormonal fluctuations, Pregnancy, Breastfeeding</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Yellow, Green, or Brown</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Duct Ectasia, Infection</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Bloody</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Duct Papilloma, Paget's Disease, Breast Cancer</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>White or Cloudy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Infection</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 38-year-old woman presents with a firm, immobile mass in her right breast for the past few days. 2 weeks ago, she bruised her breast while exercising. A mammogram reveals scattered punctate calcifications within the lump. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Mastitis", "correct": false}, {"label": "B", "text": "Breast abscess", "correct": false}, {"label": "C", "text": "Fat Necrosis", "correct": true}, {"label": "D", "text": "Inflammatory Breast Cancer", "correct": false}], "correct_answer": "C. Fat Necrosis", "question_images": ["https://image.prepladder.com/content/b1AUtrc26MZ4n1G5cAEw1737515305.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following Category Diseases/disorders 1. Non-proliferative breast changes a) Sclerosing adenosis 2. Proliferative diseases without atypia b) Mild hyperplasia 3. Proliferative breast diseases with atypia c) Precancerous condition 4. Carcinoma in situ d) Atypical ductal hyperplasia", "options": [{"label": "A", "text": "1- b, 2-d, 3-c, 4-a", "correct": false}, {"label": "B", "text": "1- b, 2-a, 3-d, 4-c", "correct": true}, {"label": "C", "text": "1- d, 2-a, 3-d, 4-c", "correct": false}, {"label": "D", "text": "1- d, 2-c, 3-a, 4-b", "correct": false}], "correct_answer": "B. 1- b, 2-a, 3-d, 4-c", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Category</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diseases/disorders </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-proliferative breast changes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild hyperplasia, <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> ectasia, cysts, <span class=\"customMeta\" data-dictid=\"495f6155fb1692777181ce9121d548\">apocrine</span> metaplasia, adenosis, <span class=\"customMeta\" data-dictid=\"633e6ef4ca169277720219ea037f2c\">fibroadenoma</span> without complex features</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proliferative diseases without atypia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Moderate or <span class=\"customMeta\" data-dictid=\"dd2ae0244816927772021f36402705\">florid</span> hyperplasia, <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> adenosis, complex <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> lesion, <span class=\"customMeta\" data-dictid=\"633e6ef4ca169277720219ea037f2c\">fibroadenoma</span> with complex features</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proliferative breast diseases with atypia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Atypical ductal hyperplasia</p>\n<p>Atypical lobular hyperplasia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Carcinoma in situ</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Precancerous condition</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the absolute risk of a fibrocystic lesion of the breast converting to malignancy?", "options": [{"label": "A", "text": "&lt;1%", "correct": false}, {"label": "B", "text": "3%", "correct": true}, {"label": "C", "text": "5-7%", "correct": false}, {"label": "D", "text": "13-17%", "correct": false}], "correct_answer": "B. 3%", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Category</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diseases/disorders </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Relative risk and absolute lifetime risk</strong></p>\n<br/>\n\t\t\t </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-proliferative</p>\n<p>breast changes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild hyperplasia, <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> ectasia, <strong>cysts,</strong> <span class=\"customMeta\" data-dictid=\"495f6155fb1692777181ce9121d548\">apocrine</span> metaplasia, adenosis, <span class=\"customMeta\" data-dictid=\"633e6ef4ca169277720219ea037f2c\">fibroadenoma</span> without complex features</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Relative risk: 1%</li>\n<li><strong>Absolute risk: 3%</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Proliferative</p>\n<p>diseases without</p>\n<p>atypia</p>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Moderate or <span class=\"customMeta\" data-dictid=\"dd2ae0244816927772021f36402705\">florid</span> hyperplasia, <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> adenosis, complex <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> lesion, <span class=\"customMeta\" data-dictid=\"633e6ef4ca169277720219ea037f2c\">fibroadenoma</span> with complex features</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Relative risk: 1.5-2% (2%)</li>\n<li>Absolute risk: 5-7% (6%)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Proliferative</p>\n<p>breast diseases</p>\n<p>with atypia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Atypical ductal hyperplasia</li>\n<li>Atypical lobular hyperplasia</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Relative risk: 4-5% (4%)</li>\n<li>Absolute risk: 13-17% (>12%)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Carcinoma in situ</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Precancerous condition</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Relative risk: 8-10 (8%)</li>\n<li>Absolute risk: 25-30% (>24%)</li>\n</ul>\n<br/>\n\t\t\t </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 38-year-old woman presents with a firm, irregular mass that has been slowly increasing in size over the past few months. Histopathological examination shows the following, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Sclerosing adenosis", "correct": false}, {"label": "B", "text": "Radial scar", "correct": true}, {"label": "C", "text": "Papilloma", "correct": false}, {"label": "D", "text": "Paget’s disease", "correct": false}], "correct_answer": "B. Radial scar", "question_images": ["https://image.prepladder.com/content/BPo8F9MbW8d1aWbsIRYO1737515799.png"], "explanation_images": ["https://image.prepladder.com/content/BIFqQCsDEMtaW8E7LwPq1737515882.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 38-year-old woman presents with cyclical breast pain, most severe in the week before her period. She also notices her breasts feeling lumpy and swollen around the time of her period, which subsides later. She denies any fever, nipple discharge, or lumps. What is the most likely finding seen in this pathology?", "options": [{"label": "A", "text": "Peau d'orange appearance of the skin", "correct": false}, {"label": "B", "text": "Nipple retraction and bloody discharge", "correct": false}, {"label": "C", "text": "Blue dome of Bloodgood cyst", "correct": true}, {"label": "D", "text": "Eczematous changes of the nipple and areola", "correct": false}], "correct_answer": "C. Blue dome of Bloodgood cyst", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/3sZDn17dl08XRrGPZfdj1737516221.png", "https://image.prepladder.com/content/zRJRGzEATRnsS19SP3sH1737516304.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 34-year-old woman comes to the clinic due to a mass in her right breast. A 2-cm nodule is noted on breast examination, and the patient is referred for biopsy. Histologic evaluation of the tissue specimen is shown in the image below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Ductal Carcinoma In Situ", "correct": false}, {"label": "B", "text": "Intracanalicular Fibroadenoma", "correct": true}, {"label": "C", "text": "Sclerosing adenosis", "correct": false}, {"label": "D", "text": "Pericanalicular Fibroadenoma", "correct": false}], "correct_answer": "B. Intracanalicular Fibroadenoma", "question_images": ["https://image.prepladder.com/notes/GtPOYrnv7IKOTp2af4IT1731649839.jpg"], "explanation_images": ["https://image.prepladder.com/notes/GtPOYrnv7IKOTp2af4IT1731649839.jpg", "https://image.prepladder.com/content/bMh1q7RVclYcwF0KiVSk1737522962.png", "https://image.prepladder.com/notes/6eG1BHiPmvQgd2a0VIHT1731650091.png"], "explanation": "<p><strong>References:</strong></p>\n<ul><li>↳ Indications for surgical excision: Age >30 years Size >5 cm Microlobulation on imaging Atypia on histology Family history of breast cancer, and The patient’s preference</li><li>↳ Age >30 years Size >5 cm Microlobulation on imaging Atypia on histology Family history of breast cancer, and The patient’s preference</li><li>↳ Age >30 years</li><li>↳ Size >5 cm</li><li>↳ Microlobulation on imaging</li><li>↳ Atypia on histology</li><li>↳ Family history of breast cancer, and</li><li>↳ The patient’s preference</li></u\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a feature of complex fibroadenoma?", "options": [{"label": "A", "text": "Cysts larger than 0.3cm", "correct": false}, {"label": "B", "text": "Sclerosing adenosis", "correct": false}, {"label": "C", "text": "Nodules of proliferating stroma forming bulbous protrusions", "correct": true}, {"label": "D", "text": "Papillary apocrine change", "correct": false}], "correct_answer": "C. Nodules of proliferating stroma forming bulbous protrusions", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements about phyllodes tumors of the breast is incorrect?", "options": [{"label": "A", "text": "They originate in the connective tissue of the breast", "correct": false}, {"label": "B", "text": "Often present as rapidly growing breast masses", "correct": false}, {"label": "C", "text": "They vary in size from a few centimeters to massive lesions", "correct": false}, {"label": "D", "text": "These lesions are always benign", "correct": true}], "correct_answer": "D. These lesions are always benign", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/CYd8VBhvCMGiCyPqo3FK1731650506.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following breast tumors are correctly paired with their histopathological characteristics? 1. Fibrocystic changes 2. Duct ectasia 3. Phyllodes tumor 4. Invasive Ductal Carcinoma", "options": [{"label": "A", "text": "1, 2, 3", "correct": false}, {"label": "B", "text": "2, 3, 4", "correct": false}, {"label": "C", "text": "1, 3, 4", "correct": true}, {"label": "D", "text": "1, 2, 3, 4", "correct": false}], "correct_answer": "C. 1, 3, 4", "question_images": ["https://image.prepladder.com/content/elFF31jZHdDLEs72pLSi1737518425.png", "https://image.prepladder.com/notes/OZDQ4uPa6VD006Q1MWnT1743678117.png", "https://image.prepladder.com/content/G29Chldm7w9WQsbnkC5B1737518597.png", "https://image.prepladder.com/content/lKC1z3dKZgNETmEW5seA1737518665.png"], "explanation_images": ["https://image.prepladder.com/content/6Wly6xNBmKwdNQCdjvTY1737521784.png", "https://image.prepladder.com/content/7nm9j8RK7L20KxP9LYYG1737521860.png", "https://image.prepladder.com/content/lhOJwt6D5oVISMmdHNTl1737521962.png", "https://image.prepladder.com/content/UUFjZl5YjralUaTcMB4b1737522418.png", "https://image.prepladder.com/content/XUFplbGgQIQVPGbHD0nv1737522486.png", "https://image.prepladder.com/content/83wPZjRn45gKfEsLPpaz1737522541.png", "https://image.prepladder.com/content/eBG15CMp8jc0kkuSz9ix1737522614.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:703px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Fibrocystic changes </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cysts:</strong> Fluid-filled sacs within the breast tissue, often surrounded by <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> tissue.</p>\n<p><strong>Fibrosis:</strong> Thickening and <span class=\"customMeta\" data-dictid=\"e9dcc3d4241692777198c7030bf313\">scarring</span> of breast tissue, which may result in <span class=\"customMeta\" data-dictid=\"bd478e4ff816927771949528846af9\">palpable</span> lumps or areas of increased density on <span class=\"customMeta\" data-dictid=\"fe3220767716927771892419444041\">imaging</span> studies.</p>\n<p><strong>Apocrine Metaplasia:</strong> Transformation of ductal epithelial cells into apocrine-like cells, characterized by abundant <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and <span class=\"customMeta\" data-dictid=\"c6223a27fb169277718147405290e1\">apical</span> snouts.</p>\n<p><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://librepathology.org/wiki/File:Fibrocystic_change_-_very_high_mag.jpg\" data-tags=\"\" height=\"221\" src=\"https://image.prepladder.com/content/6Wly6xNBmKwdNQCdjvTY1737521784.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Duct <span class=\"customMeta\" data-dictid=\"def85be6371692777186604c253b12\">ectasia</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A lot of foamy macrophages, <span class=\"customMeta\" data-dictid=\"b7e71e2acf1692777195087acd2271\">periductal</span> lymphocytic infiltrates can be observed.</p>\n<p><img alt=\"\" data-author=\"Radjiv Goulabchand,Assia Hafidi,Philippe Van de Perre,Ingrid Millet,Alexandre Thibault Jacques Maria,Jacques Morel,Alain Le Quellec,Hélène Perrochia,Philippe Guilpain\" data-hash=\"\" data-license=\"CC BY\" data-source=\"https://www.researchgate.net/figure/Mammary-duct-ectasia-Ductal-ectasia-asterisks-Periductal-lymphocytic-infiltrates_fig2_340402849\" data-tags=\"\" height=\"391\" src=\"https://image.prepladder.com/content/7nm9j8RK7L20KxP9LYYG1737521860.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Phyllodes tumor </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased stromal <span class=\"customMeta\" data-dictid=\"aed7aaaa4516927771844cded86cdb\">cellularity</span> and overgrowth, giving rise to the typical <strong>leaf-like architecture.</strong></p>\n<p><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Phyllodes_tumour_-_very_low_mag.jpg\" data-tags=\"\" height=\"369\" src=\"https://image.prepladder.com/content/lhOJwt6D5oVISMmdHNTl1737521962.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Ductal <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> <span class=\"customMeta\" data-dictid=\"96aaaa68ce1692777190096abe3c8a\">In Situ</span> (DCIS)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Types of DCIS:</p>\n<ul>\n<li><strong>Micropapillary tumors</strong>: Additional epithelial cells within the lumen.</li>\n</ul>\n<ul>\n<li><strong>Cribriform tumors:</strong> Ducts filled with cells that <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> multiple lumena.</li>\n</ul>\n<ul>\n<li><strong>Solid tumors:</strong> Completely filled ducts.</li>\n</ul>\n<ul>\n<li><strong>Comedo tumors:</strong> Solid with a necrotic core</li>\n</ul>\n<p><img alt=\"\" data-author=\"Eline Boghaert,Derek C Radisky,Celeste M Nelson\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/DCIS-morphologies-Shown-are-histology-sections-left-and-schematic-representations_fig5_269188099\" data-tags=\"\" height=\"1004\" src=\"https://image.prepladder.com/content/UUFjZl5YjralUaTcMB4b1737522418.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Invasive Ductal <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (IDC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Shows more <span class=\"customMeta\" data-dictid=\"7d30ef9aee16927771936bdac2c1ff\">mucin</span> both <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> and <span class=\"customMeta\" data-dictid=\"a621be29da16927771901bc91014d1\">intracellular</span> with <span class=\"customMeta\" data-dictid=\"3ed98cf4b71692777198c4a2ea968a\">signet ring</span> cells.</p>\n<p><img alt=\"\" data-author=\"Eniola Oluyemi,Ani Peshtani,Marissa J. White,Ashley Cimino-Mathews\" data-hash=\"\" data-license=\"\" data-source=\"https://www.researchgate.net/figure/Histologic-features-of-IDC-and-DCIS-In-contrast-to-the-features-of-classic-ILC-A_fig8_355687640\" data-tags=\"\" height=\"398\" src=\"https://image.prepladder.com/content/XUFplbGgQIQVPGbHD0nv1737522486.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Fibroadenoma </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Well-defined borders due to a <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> capsule</strong>, with proliferating <span class=\"customMeta\" data-dictid=\"c077aecdcd1692777199503c836d9c\">stroma</span> potentially compressing and distorting <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> components.</p>\n<ul>\n<li><strong>Intracanalicular fibroadenoma</strong> - Ducts are compressed.</li>\n</ul>\n<p><img alt=\"\" data-author=\"Department of pathology, Calicut Medical College\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Fibroadenoma_10X.jpg\" data-tags=\"\" height=\"353\" src=\"https://image.prepladder.com/content/83wPZjRn45gKfEsLPpaz1737522541.png\" width=\"500\"/></p>\n<ul>\n<li><strong>Pericanalicular fibroadenoma</strong> - Ducts are open.</li>\n</ul>\n<p><img alt=\"\" data-author=\"KGH (Assumed)\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Breast_fibradenoma_(2).jpg\" data-tags=\"\" height=\"288\" src=\"https://image.prepladder.com/content/eBG15CMp8jc0kkuSz9ix1737522614.png\" width=\"500\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 35-year-old woman comes to the clinic presenting with swelling in the upper quadrant of her left breast. She reports changes in the skin and surrounding nipple areola complex as well. All of the following are risk factors for this condition except?", "options": [{"label": "A", "text": "Alcohol", "correct": false}, {"label": "B", "text": "Early menarche", "correct": false}, {"label": "C", "text": "Age", "correct": false}, {"label": "D", "text": "Multiparity", "correct": true}], "correct_answer": "D. Multiparity", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Relative risk</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Female gender.</li>\n<li>Increasing age. (Option C)</li>\n<li>Germline mutations of high penetrance.</li>\n<li>Strong family history (>1 first-degree relative, young age, multiple cancers).</li>\n<li>Personal history of breast cancer.</li>\n<li>High breast density.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>4.0</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Germline mutations of moderate penetrance.</li>\n<li>High-dose radiation to the chest at a young age.</li>\n<li>Family history (1 first-degree relative).</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2.1-4.0</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Early <span class=\"customMeta\" data-dictid=\"642d0c7609169277719265439d8047\">menarche</span> (age <12 years). (Option B)</li>\n<li>Late <span class=\"customMeta\" data-dictid=\"516cc2e77d169277719213e7926b59\">menopause</span> (age >55 years).</li>\n<li>Late first pregnancy (age >35 years).</li>\n<li>Nulliparity.</li>\n<li>Absence of breastfeeding.</li>\n<li>Exogenous hormone therapy.</li>\n<li>Postmenopausal obesity.</li>\n<li>Physical inactivity.</li>\n<li>High alcohol consumption. (Option A)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1.1-2.0</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Relative risk is the likelihood of developing <span class=\"customMeta\" data-dictid=\"1c5272ad3d1692777190e71409d07a\">invasive</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> compared to women without any risk factors.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Protective factors </strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Early full term pregnancy</li>\n<li>Multiparity</li>\n<li>Lactation and breastfeeding</li>\n<li>Late <span class=\"customMeta\" data-dictid=\"642d0c7609169277719265439d8047\">menarche</span> and early menopause</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Mutations in which of the following genes is not associated with breast cancer?", "options": [{"label": "A", "text": "BRCA1", "correct": false}, {"label": "B", "text": "STK11", "correct": false}, {"label": "C", "text": "CDH1", "correct": false}, {"label": "D", "text": "CHEK1", "correct": true}], "correct_answer": "D. CHEK1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:610px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>High <span class=\"customMeta\" data-dictid=\"cd2e83c3ad1692777195dad2ab75ec\">penetrance</span> mutations (>4-fold risk, 3-7% of breast cancers)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>% of single-cell cancers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated tumors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>BRCA1 <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>55%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breast, ovarian (~20%–40%), <span class=\"customMeta\" data-dictid=\"efc83dab2c1692777202b5d1d06c4f\">fallopian</span> tube, pancreas, and prostate.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>BRCA2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>35%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Breast, ovarian (~10%–20%), pancreas, and prostate.</li>\n<li>Associated with male breast cancer.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TP53</p>\n</td>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p><1%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breast, sarcoma, leukemia, and brain tumors.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PTEN</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breast, thyroid, and endometrium.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>STK11 <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breast, ovarian, colon, and pancreas.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CDH1<strong> (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breast, <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> <span class=\"customMeta\" data-dictid=\"3ed98cf4b71692777198c4a2ea968a\">signet ring</span> cell carcinoma, and colon.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PALPB2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breast, pancreas, and prostate.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Moderate <span class=\"customMeta\" data-dictid=\"cd2e83c3ad1692777195dad2ab75ec\">penetrance</span> <span class=\"customMeta\" data-dictid=\"7fdc76e59a169277718826b9b9806d\">germline</span> mutations (2- to 4-fold increased risk; 5-10% of breast cancers)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ATM</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p>5%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CHEK2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prostate, thyroid, colon, and kidney.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 52-year-old woman presents for her routine mammogram, which reveals microcalcifications in the right breast. She has no significant family history of breast cancer and is asymptomatic. A core needle biopsy is performed, and the histopathological image is shown below. Based on histopathology, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Invasive Ductal Carcinoma", "correct": false}, {"label": "B", "text": "Lobular Carcinoma in Situ", "correct": false}, {"label": "C", "text": "Ductal Carcinoma in Situ", "correct": true}, {"label": "D", "text": "Fibroadenoma", "correct": false}], "correct_answer": "C. Ductal Carcinoma in Situ", "question_images": ["https://image.prepladder.com/notes/Yb6cwBEYVwkjnjq9a7Ef1731553874.png"], "explanation_images": ["https://image.prepladder.com/content/JhrUxAkeXC9u3fmjozfz1737601909.png", "https://image.prepladder.com/content/5XkVU3LhpPpLSaP7xWIK1737601960.png", "https://image.prepladder.com/content/JZuYI0Kn6ncBdDap3eeD1737602052.png", "https://image.prepladder.com/content/HnvNLP5DMmJG4ukGDGi31737602116.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Comedo</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It may occasionally produce a vague nodularity but is often detected as clustered or <span class=\"customMeta\" data-dictid=\"d02067c4b51692777191b8eec8b062\">linear</span> and branching areas of calcification.</li>\n<li>Two features define it:\n\t\t\t\t<ul>\n<li>Tumor cells with pleomorphic, <span class=\"customMeta\" data-dictid=\"ffb779b5ad1692777189091a0aef76\">high-grade</span> nuclei.</li>\n<li>Areas of central necrosis.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cribriform</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It has rounded (cookie cutter–like) spaces, often filled with calcified <span class=\"customMeta\" data-dictid=\"9e7aec9ff416927771984a1e3100b7\">secretory</span> material.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Micropapillary</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It produces complex <span class=\"customMeta\" data-dictid=\"fe824aa5561692777183e979333339\">bulbous</span> protrusions without <span class=\"customMeta\" data-dictid=\"a415391b321692777202ff36543c1c\">fibrovascular</span> cores.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Papillary</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It produces true <span class=\"customMeta\" data-dictid=\"c948d4dca7169277719474a468ff5e\">papillae</span> with <span class=\"customMeta\" data-dictid=\"a415391b321692777202ff36543c1c\">fibrovascular</span> cores that lack a <span class=\"customMeta\" data-dictid=\"3014a71dee1692777193ddfcad6aa3\">myoepithelial</span> cell layer.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Solid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>The <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> is full of cells and becomes solid.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Im4dedRY4BgS8XJ6cMLu1745562956.mp3", "video": ""}, {"text": "A 45-year-old woman presented with a palpable breast lump detected during a routine self-examination. A biopsy confirmed the diagnosis of infiltrating ductal carcinoma (IDC). Which of the following is not a subtype of IDC? 1. Tubular carcinoma 2. Medullary carcinoma 3. Colloid carcinoma 4. Lobular carcinoma 5. Papillary carcinoma 6. Apocrine carcinoma 7. Secretory carcinoma 8. Myofibroblastoma 9. Angiosarcoma", "options": [{"label": "A", "text": "3, 4, 8, 9", "correct": false}, {"label": "B", "text": "4, 6, 8", "correct": false}, {"label": "C", "text": "2, 4, 7, 9", "correct": false}, {"label": "D", "text": "4, 8, 9", "correct": true}], "correct_answer": "D. 4, 8, 9", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old woman presents with discomfort in her left breast. Mammography reveals a suspicious mass. Ultrasound-guided core needle biopsy is performed. Based on the histopathological findings, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Lobular carcinoma", "correct": false}, {"label": "B", "text": "Ductal carcinoma in situ", "correct": false}, {"label": "C", "text": "Medullary carcinoma", "correct": false}, {"label": "D", "text": "Mucinous carcinoma", "correct": true}], "correct_answer": "D. Mucinous carcinoma", "question_images": ["https://image.prepladder.com/content/6dxeLt1EgSxOo7nwG1OK1737602657.png", "https://image.prepladder.com/content/CPiorWS0fUeIa3bz6muV1737602712.png"], "explanation_images": ["https://image.prepladder.com/content/L8egjnvNHwRBt2rKznan1737603060.png", "https://image.prepladder.com/content/PGnr47ErKqziebRYSMNU1737602582.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:670px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">Gross <span class=\"customMeta\" data-dictid=\"54e0888a6616927771945a99208287\">pathology</span> (upper left) of biopsies of <span class=\"customMeta\" data-dictid=\"2f72b35d711692777193801d8e084d\">mucinous</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> shows <span class=\"customMeta\" data-dictid=\"be6fe9c6c316927771889dbaaf2b89\">gelatinous</span> areas (which are <span class=\"customMeta\" data-dictid=\"fb59d538e21692777200b3702d4802\">transparent</span> compared to normal yellow <span class=\"customMeta\" data-dictid=\"bc6cd9a9f9169277720261812ea113\">fatty</span> tissue). <span class=\"customMeta\" data-dictid=\"d69566338f1692777189ff10521054\">Histopathology</span> shows clusters or nests of tumor cells floating in pools of <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> mucin.</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/mc86vbVmazoEm30sDWXP1747671769.mp3", "video": ""}, {"text": "Which of the following is associated with the worst prognosis?", "options": [{"label": "A", "text": "Paget’s disease", "correct": false}, {"label": "B", "text": "Metaplastic carcinoma", "correct": false}, {"label": "C", "text": "Medullary carcinoma", "correct": false}, {"label": "D", "text": "Inflammatory carcinoma", "correct": true}], "correct_answer": "D. Inflammatory carcinoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/WrfVOG9tl7ai1ubklSCy1731555544.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old woman presents with a newly diagnosed left-sided breast mass on routine mammography. Core needle biopsy shows the following findings. Further molecular study revealed the involvement of the CDH1 gene. Which of the following statements are incorrect concerning this type of breast cancer? 1) Increased E-cadherin expression is observed in tumor cells. 2) Minimal desmoplasia and fibrosis were observed on microscopy. 3) A contralateral breast examination is usually required due to bilateral involvement. 4) It is associated with a poor prognosis compared to other types of breast cancer. 5) Metastatic spread affects leptomeninges and retroperitoneum.", "options": [{"label": "A", "text": "1, 2, 3, 4", "correct": false}, {"label": "B", "text": "1, 2, 3", "correct": false}, {"label": "C", "text": "1, 4", "correct": true}, {"label": "D", "text": "1, 2, 4, 5", "correct": false}], "correct_answer": "C. 1, 4", "question_images": ["https://image.prepladder.com/notes/AAq5qS0As37dtxU0EHf41731555907.png"], "explanation_images": ["https://image.prepladder.com/notes/AAq5qS0As37dtxU0EHf41731555907.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Consider the following statements about Paget's disease of the breast? 1. It is an in-situ cancer. 2. Presence of Paget cells is needed for diagnosis. 3. Underlying carcinoma is usually LCIS. 4. Immunostaining is positive for carcinoembryonic antigen (CEA). Which of the above are true statements?", "options": [{"label": "A", "text": "1,3, and 4", "correct": false}, {"label": "B", "text": "1,2, and 4", "correct": true}, {"label": "C", "text": "1,2, and 3", "correct": false}, {"label": "D", "text": "All of the above", "correct": false}], "correct_answer": "B. 1,2, and 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/FEhOs0fIQdWacPqgG8zL1737603671.png", "https://image.prepladder.com/content/LCBcY7V2wefXa0hKsgJD1737603576.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Paget’s Disease of Bone (Osteitis Deformans) </strong>is a chronic disorder of <span class=\"customMeta\" data-dictid=\"f8406817f21692777183176660cf3d\">bone remodeling</span> characterized by excessive <span class=\"customMeta\" data-dictid=\"17d9369c3f1692777183b01f1dc72f\">bone resorption</span> followed by disorganized bone formation.</p>\n<ul>\n<li>Presents with Bone pain, deformities (e.g., bowed legs, enlarged skull), <span class=\"customMeta\" data-dictid=\"c0c247b89916927771948bc5e6d39c\">pathological</span> fractures and <span class=\"customMeta\" data-dictid=\"f3f80e5bee1692777188f6eb1c4005\">hearing loss</span> (if skull is affected- <span class=\"customMeta\" data-dictid=\"6b7b5460171692777185e6e2475f8c\">cranial</span> nerve compression)</li>\n<li>X-ray - Mixed <span class=\"customMeta\" data-dictid=\"d54da38aaa1692777191560f60c0f9\">lytic</span> and <span class=\"customMeta\" data-dictid=\"934e9f88af169277719847f1a0728f\">sclerotic</span> lesions \"Cotton wool\" appearance in skull and thickened <span class=\"customMeta\" data-dictid=\"721937292f1692777185048f04ce29\">cortical</span> bone</li>\n<li>Complications: <span class=\"customMeta\" data-dictid=\"720567fecd169277719411dda3d1a2\">Osteoarthritis</span> Fractures Sarcomatous transformation (osteosarcoma)</li>\n<li>Treatment: Bisphosphonates and <span class=\"customMeta\" data-dictid=\"cc4b4052651692777183edb479e5b9\">Calcitonin</span> for pain relief</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Paget’s</strong> <strong>Disease of the Vulva</strong> is a rare <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> <span class=\"customMeta\" data-dictid=\"362992dbb11692777180f9017fc04d\">adenocarcinoma</span> of the vulva, often associated with underlying malignancy.</p>\n<ul>\n<li>Presents with <strong>pruritus</strong> (persistent itching), <strong>erythematous</strong>, <strong>scaly</strong>, or <strong>velvety</strong> <strong>lesions</strong> on the vulva, burning sensation or discomfort</li>\n<li>Histopathology: Large cells with abundant pale <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> (<strong>Paget</strong> <strong>cells</strong>) within the <span class=\"customMeta\" data-dictid=\"e4c62a77731692777187b9c7ded25d\">epidermis</span> Diagnosis: <span class=\"customMeta\" data-dictid=\"754ab07a2e1692777183ed178c883d\">Biopsy</span> + Immunohistochemistry: <strong>Positive</strong> for <strong>CK7</strong> and <strong>CEA</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "You are provided with results of receptor status from the biopsy obtained from a patient’s breast lump. You realize that her molecular subtype carries a low proliferative rate and a better prognosis. Which of the following will not be the likely histological subtype in this patient?", "options": [{"label": "A", "text": "Tubular carcinoma", "correct": false}, {"label": "B", "text": "Medullary carcinoma", "correct": true}, {"label": "C", "text": "Papillary carcinoma", "correct": false}, {"label": "D", "text": "Mucinous carcinoma", "correct": false}], "correct_answer": "B. Medullary carcinoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:614px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Classification</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hormone receptor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HER2/Neu</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Others</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Luminal A</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive (either or both ER/PR)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Luminal B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive (either or both ER/PR)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative / Positive</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 high</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Basal type (triple -ve)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 usually high</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HER2/neu enriched</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 high</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Claudin low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Claudin low</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:616px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Luminal A (Low <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> rate)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Tubular <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> <strong>(Option A ruled out).</strong></li>\n<li>Papillary <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (<strong>Option C ruled out).</strong></li>\n<li>Mucinous <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> <strong>(Option D ruled out).</strong></li>\n<li>Low-grade ILC.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Luminal B (High <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> rate)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>High-grade ILC.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HER2/Neu rich</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Apocrine carcinoma.</li>\n<li>Micropapillary carcinoma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Triple-negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Medullary carcinoma. <strong>(Option B)</strong></li>\n<li>Metaplastic carcinoma.</li>\n<li>Secretory carcinoma.</li>\n<li>Adenoid <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> carcinoma.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient with a lump in her left breast is subjected to a biopsy. Subsequent immunohistochemistry was done and the image is given below. After an MDT discussion, a decision was made to prescribe Trastuzumab as the appropriate management for this patient. What would have been the diagnosis based on the above clinical scenario?", "options": [{"label": "A", "text": "Apocrine carcinoma", "correct": true}, {"label": "B", "text": "Medullary carcinoma", "correct": false}, {"label": "C", "text": "Tubular carcinoma", "correct": false}, {"label": "D", "text": "Papillary carcinoma", "correct": false}], "correct_answer": "A. Apocrine carcinoma", "question_images": ["https://image.prepladder.com/notes/xd3EA7847vzsv3OZcTV41731556745.jpg"], "explanation_images": ["https://image.prepladder.com/content/IrT65ljUbUFYXDqGQtD11737604182.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A biopsy taken from a patient's breast lump is subjected to histopathological examination. Upon staining, it is found to be a luminal breast carcinoma with a high proliferative rate. Overexpression of which of the following cellular proteins has led to this interpretation?", "options": [{"label": "A", "text": "Alpha catenin", "correct": false}, {"label": "B", "text": "Arp-2/3", "correct": false}, {"label": "C", "text": "Ki-67", "correct": true}, {"label": "D", "text": "Vimentin", "correct": false}], "correct_answer": "C. Ki-67", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/kA286S6bm7w3iNE2rgmF1737604345.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following parameters is not assessed in the Bloom-Richardson scoring system?", "options": [{"label": "A", "text": "Nuclear size", "correct": false}, {"label": "B", "text": "Tubule formation", "correct": false}, {"label": "C", "text": "Size of the tumor", "correct": true}, {"label": "D", "text": "Mitotic count", "correct": false}], "correct_answer": "C. Size of the tumor", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:348px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Score</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grade</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3-5</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>I</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>6 or 7</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>II</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>8 or 9</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>III</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 27-year-old woman discovers a well-defined mobile and rubbery breast lump measuring 4x7 cm on self-examination. The lesion is painless and has been stable over several months. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute mastitis", "correct": false}, {"label": "B", "text": "Fibroadenoma", "correct": true}, {"label": "C", "text": "Ductal ectasia", "correct": false}, {"label": "D", "text": "Sclerosing adenosis", "correct": false}], "correct_answer": "B. Fibroadenoma", "question_images": ["https://image.prepladder.com/content/AWNApbWE6bT6qbDvDe531747311065.png"], "explanation_images": ["https://image.prepladder.com/notes/oiFFsk3AVFyeabi94hKX1747650706.png", "https://image.prepladder.com/content/0ww1TLJG95ztb5JYEXiS1747311099.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:900px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Fibroadenoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Benign tumours arising from the <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> tissue in the breast</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Prevalence</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Most common in women aged <strong>15-25 years.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Aetiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Believed to be influenced by <strong>hormonal fluctuations</strong> during <span class=\"customMeta\" data-dictid=\"11e24b369816927771974383c7e17c\">reproductive</span> years</li>\n<li>Molecular alteration: Alterations in <strong>MED12 gene.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical Presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Painless, firm, rubbery, and mobile lumps</li>\n<li>Described as feeling like a<strong> \"marble in the breast.\"</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Histopathology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Well-defined borders due to a <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> capsule, with proliferating <span class=\"customMeta\" data-dictid=\"c077aecdcd1692777199503c836d9c\">stroma</span> potentially compressing and distorting <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> components.</li>\n<li>The <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> may be of 2 patterns:\n\t\t\t\t<ul>\n<li><strong>Pericanalicular Pattern:</strong> Surrounded by stroma</li>\n<li><strong>Intracanalicular Pattern:</strong> Compressed and distorted by it.</li>\n</ul>\n</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Fibroadenoma\" data-author=\"Gary Tozbikian, M.D., Debra Zynger, M.D., Azadeh Khayyat, M.D. and Julie M. Jorns, M.D\" data-hash=\"12959\" data-license=\"NA\" data-source=\"https://www.pathologyoutlines.com/topic/breastfibroadenoma.html\" data-tags=\"May2025\" height=\"263\" src=\"https://image.prepladder.com/notes/oiFFsk3AVFyeabi94hKX1747650706.png\" width=\"431\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mammogram </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Popcorn <span class=\"customMeta\" data-dictid=\"a1ee14c673169277718351bfe6afd4\">calcification</span> </strong>on mammogram</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"SCiardullo\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Calcificaciones_en_pop-corn_OML_01.JPG\" data-tags=\"\" height=\"488\" src=\"https://image.prepladder.com/content/0ww1TLJG95ztb5JYEXiS1747311099.png\" width=\"313\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Triple Assessment: </strong>Clinical examination, radiological <span class=\"customMeta\" data-dictid=\"fe3220767716927771892419444041\">imaging</span> (ultrasound), tissue <span class=\"customMeta\" data-dictid=\"521de62abe16927771989a90d0e9e8\">sampling</span> (core-needle biopsy)</li>\n<li>Ultrasound: Helps distinguish fibroadenomas from cysts</li>\n<li>Core-Needle Biopsy: Provides <span class=\"customMeta\" data-dictid=\"32b854324a1692777185c6c79fdc99\">definitive</span> diagnosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Conservative Management: Watchful waiting, regular monitoring</li>\n<li>Surgical Excision: For larger fibroadenomas, those causing symptoms, or uncertain diagnosis</li>\n<li>Giant Fibroadenomas: Over 5 cm, may require <span class=\"customMeta\" data-dictid=\"20b3ce06c5169277718756ee95c1e9\">excision</span> through <span class=\"customMeta\" data-dictid=\"d8c57cf5eb169277719912053c51a1\">submammary</span> incision</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Benign</strong>, does not increase the risk of breast cancer</li>\n<li>Growth can vary, influenced by hormonal changes</li>\n<li>Recurrence is uncommon</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Relationship to ANDI</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Categorised according to <strong>ANDI</strong> as:\n\t\t\t\t<ul>\n<li>Normal: Small fibroadenomas (≤1 cm)</li>\n<li>Disorder: Larger fibroadenomas (≤3 cm)</li>\n<li>Disease: Giant fibroadenomas (>3 cm), multiple fibroadenomas</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What does luminal type A tumour refer to?", "options": [{"label": "A", "text": "ER+ / HER2 neu- ; mild to moderate proliferation", "correct": true}, {"label": "B", "text": "ER+ / HER2 neu+", "correct": false}, {"label": "C", "text": "ER- / HER2 neu-", "correct": false}, {"label": "D", "text": "ER+ / HER2 neu- ; high proliferation", "correct": false}], "correct_answer": "A. ER+ / HER2 neu- ; mild to moderate proliferation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Molecular <span class=\"customMeta\" data-dictid=\"dda6ab11271692777184264b752d39\">classification</span> of breast cancer</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Classification</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hormone receptor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HER2/Neu</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Others</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Luminal A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive (either or both ER/PR)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 low (mild to moderate proliferation)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Luminal B</strong></p>\n<p><strong>(Options A & D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive (either or both ER/PR)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative/ positive</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 high (high proliferation)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Basal type (triple -ve)</strong></p>\n<p><strong>(Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 usually high</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HER2/neu enriched</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ki-67 high</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Claudin low</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Claudin low</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Classification</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histological subtypes </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Luminal A (Low <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> rate)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Tubular carcinoma</li>\n<li>Papillary carcinoma</li>\n<li>Mucinous carcinoma</li>\n<li>Low-grade ILC.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Luminal B (High <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> rate)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>High-grade ILC.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HER2/Neu rich</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Apocrine carcinoma.</li>\n<li>Micropapillary carcinoma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Triple-negative</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Medullary carcinoma.</li>\n<li>Metaplastic carcinoma.</li>\n<li>Secretory carcinoma.</li>\n<li>Adenoid <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> carcinoma.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A woman presents with a firm and irregular lump in the upper outer quadrant of her breast. The histopathological slide of the mass sample is provided. What is the most likely diagnosis? f", "options": [{"label": "A", "text": "Phyllodes tumor", "correct": false}, {"label": "B", "text": "Inflammatory breast carcinoma", "correct": false}, {"label": "C", "text": "Invasive lobular carcinoma", "correct": true}, {"label": "D", "text": "Fibroadenoma", "correct": false}], "correct_answer": "C. Invasive lobular carcinoma", "question_images": ["https://image.prepladder.com/content/HTpYXPfVofCwEA5qQngg1699616299.png"], "explanation_images": ["https://image.prepladder.com/content/ocJAlTd7JbVvPLFfg7dn1699616301.png"], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"1c5272ad3d1692777190e71409d07a\">Invasive</span> lobu\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is NOT a favorable prognostic marker for a middle-aged woman diagnosed with breast carcinoma presenting with a lump in her right breast?", "options": [{"label": "A", "text": "Luminal subtype", "correct": false}, {"label": "B", "text": "Low Ki7 index", "correct": false}, {"label": "C", "text": "Her2 overexpression", "correct": true}, {"label": "D", "text": "Mucinous carcinoma", "correct": false}], "correct_answer": "C. Her2 overexpression", "question_images": [], "explanation_images": [], "explanation": "\n<table style=\"width:100%\">\n<tbody>\n<tr>\n<td>\n<p><span><span><span><strong> </strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Good prognosis</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Bad prognosis</span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><span><span><span><strong><span><span><span>Extent</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>In Situ carcinoma</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Invasive carcinoma</span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><span><span><span><strong> </strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>Spread</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong> </strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Locally advanced disease,</span></span></span></strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>Lymphovascular invasion</span></span></span></strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>Distant <span class=\"customMeta\" data-dictid=\"d3251bfb0b1692777192b069d7ba4a\">metastasis</span> </span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><span><span><span><strong><span><span><span>Size</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Size <1 cm</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Size >2 cm</span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><span><span><span><strong><span><span><span>Histological subtype</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>·</span></span></span></strong><strong> </strong><strong><span><span><span>Tubular carcinoma</span></span></span></strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>·</span></span></span></strong><strong> </strong><strong><span><span><span>Mucinous carcinoma</span></span></span></strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>·</span></span></span></strong><strong> </strong><strong><span><span><span>Lobular carcinoma</span></span></span></strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>·</span></span></span></strong><strong> </strong><strong><span><span><span>Papillary carcinoma</span></span></span></strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>·</span></span></span></strong><strong> </strong><strong><span><span><span>Adenoid <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> carcinoma</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>·</span></span></span></strong><strong> </strong><strong><span><span><span>Metaplastic carcinoma</span></span></span></strong></span></span></span></p>\n<p><span><span><span><strong><span><span><span>·</span></span></span></strong><strong> </strong><strong><span><span><span>Micropapillary carcinoma</span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><span><span><span><strong><span><span><span>Histologic grade</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Low grade</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>High grade</span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><span><span><span><strong><span><span><span>Molecular subtype</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Luminal A subtype</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Her2-enriched and <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> subtype</span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><span><span><span><strong><span><span><span>Proliferation rate (Ki67 index)</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>Low <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> rate</span></span></span></strong></span></span></span></p>\n</td>\n<td>\n<p><span><span><span><strong><span><span><span>High <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> rate</span></span></span></strong></span></span></span></p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old female presents with a lump in the upper outer part of her breast. Histopathological analysis of the mass reveals a signet ring appearance. What is the probable diagnosis?", "options": [{"label": "A", "text": "Colloid carcinoma", "correct": true}, {"label": "B", "text": "Papillary carcinoma", "correct": false}, {"label": "C", "text": "Medullary carcinoma", "correct": false}, {"label": "D", "text": "Phyllodes tumour", "correct": false}], "correct_answer": "A. Colloid carcinoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/VanP4601G90ayFPgHd1Z1747909106.png", "https://image.prepladder.com/content/7CZRbLACQxKHs3U2y8uK1747909115.png", "https://image.prepladder.com/content/ChHohyWJdMkkImiyD4rl1747909125.png", "https://image.prepladder.com/content/JyEXfsn1ZlekyUwFvwje1747909141.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old woman presents with a lump in the upper outer quadrant of her breast. Histopathological examination of the mass shows cells in mucin pools and faint nuclei. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Colloid carcinoma", "correct": true}, {"label": "B", "text": "Papillary carcinoma", "correct": false}, {"label": "C", "text": "Medullary carcinoma", "correct": false}, {"label": "D", "text": "Lobular carcinoma", "correct": false}], "correct_answer": "A. Colloid carcinoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/t97xvO6Q2ty7v8SjUbmW1746517706.png", "https://image.prepladder.com/content/SwXBIXa69wbkssySFiwl1746517722.png", "https://image.prepladder.com/content/bDNZ7SUCsh1xNkpHLjZW1746517734.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gross <span class=\"customMeta\" data-dictid=\"54e0888a6616927771945a99208287\">pathology</span> (upper left) of biopsies of <span class=\"customMeta\" data-dictid=\"2f72b35d711692777193801d8e084d\">mucinous</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> shows <span class=\"customMeta\" data-dictid=\"be6fe9c6c316927771889dbaaf2b89\">gelatinous</span> areas (which are <span class=\"customMeta\" data-dictid=\"fb59d538e21692777200b3702d4802\">transparent</span> compared to normal yellow <span class=\"customMeta\" data-dictid=\"bc6cd9a9f9169277720261812ea113\">fatty</span> tissue). Histopathology shows clusters or nests of tumour cells floating in pools of <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> mucin.</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 16 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which viral organism is most commonly associated with myocarditis?", "options": [{"label": "A", "text": "Influenza", "correct": false}, {"label": "B", "text": "Human immunodeficiency virus (HIV)", "correct": false}, {"label": "C", "text": "Coxsackievirus", "correct": true}, {"label": "D", "text": "Epstein-Barr virus (EBV)", "correct": false}], "correct_answer": "C. Coxsackievirus", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements best describes the vegetation found in Infective Endocarditis compared to other conditions?", "options": [{"label": "A", "text": "Vegetations in Infective Endocarditis are typically small, friable, sterile and composed of fibrin, and platelets.", "correct": false}, {"label": "B", "text": "Vegetations in Infective Endocarditis are large, verrucous, and primarily consist of fibrin, inflammatory cells, and microorganisms.", "correct": true}, {"label": "C", "text": "Nonbacterial Thrombotic Endocarditis (NBTE) commonly presents with small, non-sterile vegetations composed mainly of fibrin and platelets.", "correct": false}, {"label": "D", "text": "Libman-Sacks Endocarditis is characterised by tiny, marantic vegetations consisting of fibrin and micro-organisms.", "correct": false}], "correct_answer": "B. Vegetations in Infective Endocarditis are large, verrucous, and primarily consist of fibrin, inflammatory cells, and microorganisms.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/xEixgnv1KJx3r4pysw7X1736865637.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rheumatic heart disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Infective Endocarditis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-bacterial Thrombotic Endocarditis (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Libman-Sacks Endocarditis </strong> <strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small and warty</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large and bulky <strong>(Option B) (Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small and friable </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Medium sized</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Along lines of closure</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Upper surface of cusps</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Along lines of closure</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Both surface of valves (M/C-lower surface)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sterile</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non- sterile</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sterile</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sterile</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Emboli -</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Emboli +/-</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Emboli +++</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Emboli -</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following findings is most likely present in the myocardial biopsy of a Rheumatic Heart disease patient?", "options": [{"label": "A", "text": "Fibrous thickening of the endocardium", "correct": false}, {"label": "B", "text": "Areas of lymphocytic infiltrates, Anitschkow cells and fibroblasts in all layers of the heart", "correct": true}, {"label": "C", "text": "Calcific nodules on the valve leaflets", "correct": false}, {"label": "D", "text": "Disruption of the endothelial lining of blood vessels", "correct": false}], "correct_answer": "B. Areas of lymphocytic infiltrates, Anitschkow cells and fibroblasts in all layers of the heart", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2hfnpgVLSKpRL2gVDXXL1736866029.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a major criterion according to Jones Criteria for Rheumatic Heart Disease?", "options": [{"label": "A", "text": "Polyarthritis", "correct": false}, {"label": "B", "text": "Carditis", "correct": false}, {"label": "C", "text": "Subcutaneous nodules", "correct": false}, {"label": "D", "text": "Fever", "correct": true}], "correct_answer": "D. Fever", "question_images": [], "explanation_images": [], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Major Criteria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Minor Criteria</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Carditis <strong>(Option B)</strong></li>\n<li>Polyarthritis <strong>(Option A)</strong></li>\n<li>Chorea (Sydenham’s)</li>\n<li>Subcutaneous nodules <strong>(Option C)</strong></li>\n<li>Erythema marginatum</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical </strong></p>\n<ul>\n<li>Fever</li>\n<li>Polyarthralgia</li>\n<li>Prolonged PR interval</li>\n</ul>\n<p><strong>Lab</strong></p>\n<ul>\n<li>Increased ESR</li>\n<li>Increased CRP</li>\n</ul>\n<p>Minor criteria present in previous episodes or evidence of previous rheumatic fever</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male with a history of intravenous drug abuse, presenting with fever, malaise, and a new-onset heart murmur, reports recent injection site infections. On examination, there are multiple healing scars on the upper extremities, and a grade III/VI holosystolic murmur is auscultated at the left sternal border. His temperature is 38.5°C, heart rate is 110 bpm. Which criterion amongst the following is a major criterion for the condition diagnosed?", "options": [{"label": "A", "text": "Fever of unknown origin lasting more than 7 days", "correct": false}, {"label": "B", "text": "IV drug abuse", "correct": false}, {"label": "C", "text": "Predisposing cardiac condition such as a prosthetic heart valve", "correct": false}, {"label": "D", "text": "Positive blood cultures for typical microorganisms persistently isolated from blood cultures", "correct": true}], "correct_answer": "D. Positive blood cultures for typical microorganisms persistently isolated from blood cultures", "question_images": [], "explanation_images": [], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Major Criteria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Minor Criteria</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#0d0d0d; border-style:solid; border-width:1px; text-align:center; vertical-align:middle\">Positive blood cultures for typical microorganisms persistently isolated from blood cultures <strong>(2 cultures > 12 <span class=\"customMeta\" data-dictid=\"136c4bdd441692777189c5b2e976a0\">hrs</span> apart, single positive culture for Coxiella)</strong></td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\">Predisposing <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> conditions such as a <span class=\"customMeta\" data-dictid=\"c936e2cd131692777196b1d877f678\">prosthetic</span> <span class=\"customMeta\" data-dictid=\"efba33a3fd1692777189906f884236\">heart valve</span> <strong>(Option C),</strong> IV drug abuse<strong> (Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\">Evidence of endocardial involvement on <span class=\"customMeta\" data-dictid=\"32ccb4a6911692777186e785958dbf\">echocardiography</span> (vegetations or abscesses)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\">Fever (≥38.0°C) <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\">New valvular regurgitation</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\">Vascular phenomena (e.g., emboli, Janeway lesions)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\"> </p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\">Immunological phenomena (e.g., glomerulonephritis, Osler's nodes)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\"> </p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\">Microbiological evidence not meeting major criteria (e.g., positive <span class=\"customMeta\" data-dictid=\"590c4f61381692777183624596f6ed\">blood culture</span> but not persistently positive)</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following genes is most commonly associated with inherited forms of dilated cardiomyopathy?", "options": [{"label": "A", "text": "BRCA1 gene", "correct": false}, {"label": "B", "text": "TTN gene", "correct": true}, {"label": "C", "text": "CFTR gene", "correct": false}, {"label": "D", "text": "SCN5A gene", "correct": false}], "correct_answer": "B. TTN gene", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/vWRSLmbUMv3vuiXPXXix1736866168.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old woman presents to the emergency department with sudden-onset chest pain and shortness of breath following the news of a family member's serious illness. An electrocardiogram shows ST-segment elevation in the anterior leads, and cardiac biomarkers are elevated. Coronary angiography reveals no significant coronary artery disease. Which of the following is the most likely underlying mechanism in this patient?", "options": [{"label": "A", "text": "Excessive release of catecholamines", "correct": true}, {"label": "B", "text": "Viral myocarditis", "correct": false}, {"label": "C", "text": "Autoimmune response", "correct": false}, {"label": "D", "text": "Genetic predisposition", "correct": false}], "correct_answer": "A. Excessive release of catecholamines", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions is characterised by transient left ventricular dysfunction, often triggered by emotional or physical stress, presenting with symptoms mimicking acute coronary syndrome but with normal coronary arteries on angiography?", "options": [{"label": "A", "text": "Acute Myocardial Infarction (AMI)", "correct": false}, {"label": "B", "text": "Takotsubo Cardiomyopathy (TCM)", "correct": true}, {"label": "C", "text": "Hypertrophic Cardiomyopathy (HCM)", "correct": false}, {"label": "D", "text": "Dilated Cardiomyopathy (DCM)", "correct": false}], "correct_answer": "B. Takotsubo Cardiomyopathy (TCM)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 22-year-old man presents to his cardiologist with complaints of exertional chest pain and shortness of breath. His family history is significant for the sudden cardiac death of his brother at the age of 28. Physical examination reveals a harsh systolic murmur and irregular heart sounds. Which of the following genes is most commonly involved in this condition?", "options": [{"label": "A", "text": "Titin", "correct": false}, {"label": "B", "text": "Beta-myosin heavy chain", "correct": true}, {"label": "C", "text": "Troponin T", "correct": false}, {"label": "D", "text": "Alpha-tropomyosin", "correct": false}], "correct_answer": "B. Beta-myosin heavy chain", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 19-year-old boy collapsed during a football game and was brought dead to the hospital. Suspecting a heart condition, a biopsy was done, which showed asymmetric septal hypertrophy. Which of the following histological findings will not be seen in this condition?", "options": [{"label": "A", "text": "Massive myocyte hypertrophy", "correct": false}, {"label": "B", "text": "Myofibre disarray", "correct": false}, {"label": "C", "text": "Fibrotic narrowing of small intramural arteries", "correct": false}, {"label": "D", "text": "Ninja star nuclei", "correct": true}], "correct_answer": "D. Ninja star nuclei", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/JgBx13tiTAxK2rcJqce71736866452.png", "https://image.prepladder.com/content/MjrKGI37FXGvKoExIN8o1736866537.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a cause for restrictive cardiomyopathy?", "options": [{"label": "A", "text": "Hemochromatosis", "correct": false}, {"label": "B", "text": "Amyloidosis", "correct": false}, {"label": "C", "text": "Sarcoidosis", "correct": false}, {"label": "D", "text": "Alcohol", "correct": true}], "correct_answer": "D. Alcohol", "question_images": [], "explanation_images": [], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:491px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>CAUSES OF RESTRICTIVE CARDIOMYOPATHY</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Amyloidosis <strong>(Option B)</strong></li>\n<li>Hemochromatosis <strong>(Option A)</strong></li>\n<li>Radiation</li>\n<li>Scleroderma</li>\n<li>Tropical <span class=\"customMeta\" data-dictid=\"9ec09a7cfc169277718700e4dcac4e\">endomyocardial</span> fibrosis</li>\n<li>Hypereosinophilic syndrome (Löffler’s endocarditis)</li>\n<li>Sarcoidosis <strong>(Option C)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old woman from a rural area presents with progressively worsening dyspnea on exertion and bilateral lower limb swelling for the past few months. She reports a history of recurrent fevers and weight loss over the past year. Physical examination reveals elevated jugular venous pressure, ascites, and hepatomegaly. Chest X-ray shows an enlarged cardiac silhouette. Echocardiography reveals restrictive filling patterns with apical obliteration and thickened endocardium. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Hypertrophic cardiomyopathy", "correct": false}, {"label": "B", "text": "Dilated cardiomyopathy", "correct": false}, {"label": "C", "text": "Endomyocardial fibrosis", "correct": true}, {"label": "D", "text": "Constrictive pericarditis", "correct": false}], "correct_answer": "C. Endomyocardial fibrosis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis based on the image given below? It is a stained specimen of endomyocardial tissue.", "options": [{"label": "A", "text": "Hypertrophic cardiomyopathy", "correct": false}, {"label": "B", "text": "Dilated cardiomyopathy", "correct": false}, {"label": "C", "text": "Cardiac amyloidosis", "correct": true}, {"label": "D", "text": "Sarcoidosis", "correct": false}], "correct_answer": "C. Cardiac amyloidosis", "question_images": ["https://image.prepladder.com/content/YlEQ6PvyaXvNpfOCjPeU1736866698.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the true statements regarding atrial myxoma. 1) It is the most common primary tumor of the heart in adults. 2) It is a malignant neoplasm. 3) It is associated with mutations in the GNAS1 gene. 4) 90% of these tumors arise from ventricles. 5) Histologically, it contains lepidic cells", "options": [{"label": "A", "text": "1,2,3", "correct": false}, {"label": "B", "text": "1,2,3,4,5", "correct": false}, {"label": "C", "text": "1,3,4", "correct": false}, {"label": "D", "text": "1,3,5", "correct": true}], "correct_answer": "D. 1,3,5", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2P4bbn0LuNnzdoF7IFaT1736866795.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-month-old infant presents with cyanosis and respiratory distress. Physical examination reveals a murmur and a palpable liver edge. Echocardiography demonstrates multiple intracardiac masses located primarily in the ventricular walls. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Rhabdomyoma", "correct": true}, {"label": "B", "text": "Cardiac fibroma", "correct": false}, {"label": "C", "text": "Myxoma", "correct": false}, {"label": "D", "text": "Metastatic neuroblastoma", "correct": false}], "correct_answer": "A. Rhabdomyoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/n3pea05Qc9Eb8umRjPN71736867059.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old male presents with palpitations and dizziness during a soccer match. He is diagnosed with ARVC (Arrhythmogenic Right Ventricular Cardiomyopathy). Which of the following statements about this condition is true? Statement 1 - It is an autosomal recessive disorder Statement 2 - Associated with NAXOS syndrome Statement 3 - Marked by fatty infiltration and focal fibrosis within the ventricle Statement 4 - It involves mutation in Plakoglobin", "options": [{"label": "A", "text": "1, 2, 3", "correct": false}, {"label": "B", "text": "1, 3, 4", "correct": false}, {"label": "C", "text": "2, 3, 4", "correct": true}, {"label": "D", "text": "1, 2, 3,4", "correct": false}], "correct_answer": "C. 2, 3, 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/83q3QN7noNiiojDOtJvJ1737552958.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 26 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 65-year-old male with a history of hypertension and coronary artery disease presents with worsening shortness of breath and orthopnea. Chest X-ray reveals pulmonary congestion. Bronchoalveolar lavage shows hemosiderin-laden macrophages, as shown in the image below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Right-sided heart failure", "correct": false}, {"label": "B", "text": "Left-sided heart failure", "correct": true}, {"label": "C", "text": "Pulmonary embolism", "correct": false}, {"label": "D", "text": "Acute myocardial infarction", "correct": false}], "correct_answer": "B. Left-sided heart failure", "question_images": ["https://image.prepladder.com/content/PvPjdUPSscRSm995DVjK1736853528.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/BAww33th4rk1z0xaDmgo1745346386.mp3", "video": ""}, {"text": "Which of the following statements is incorrect regarding the pathologic changes in right-sided heart failure?", "options": [{"label": "A", "text": "Nutmeg liver appearance.", "correct": false}, {"label": "B", "text": "Pretibial oedema is the hallmark of right-sided heart failure.", "correct": false}, {"label": "C", "text": "Fibrosis in periportal areas of the liver", "correct": true}, {"label": "D", "text": "Congestive splenomegaly due to portal hypertension", "correct": false}], "correct_answer": "C. Fibrosis in periportal areas of the liver", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/HeHSwpxvw4hyWmyCBoPG1736853644.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old woman presents to the emergency department with recurrent episodes of chest pain radiating to her left arm and jaw that occur at rest and are not triggered by physical exertion. ECG during an episode shows transient ST-segment elevation. Troponin levels are normal. Which type of angina is most likely responsible for her symptoms?", "options": [{"label": "A", "text": "Stable Angina", "correct": false}, {"label": "B", "text": "Unstable Angina", "correct": false}, {"label": "C", "text": "Silent Angina", "correct": false}, {"label": "D", "text": "Prinzmetal Angina", "correct": true}], "correct_answer": "D. Prinzmetal Angina", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/355RsX0Kn5tFPWoT2rET1737649857.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:670px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Stable Angina</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Prinzmetal <span class=\"customMeta\" data-dictid=\"0efdcdc9e01692777201003c81c85a\">variant</span> angina</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Unstable or crescendo angina</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Occurs </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>During physical exertion and emotional stress due to ↑ myocardial demands.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Episodic myocardial <span class=\"customMeta\" data-dictid=\"0f670d10711692777190af4b12fac9\">ischemia</span> occurs at rest, not related to physical exertion.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The pattern of increasingly frequent, prolonged, or severe <span class=\"customMeta\" data-dictid=\"030cd51b341692777181d15302c8d4\">angina</span> occurring at rest or with minimal exertion.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated with</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"0c9567c6cb16927771996c6bc2b21e\">stenosis</span> of <span class=\"customMeta\" data-dictid=\"bc8bc758371692777185eff2ccabb7\">coronary</span> arteries due to underlying atherosclerosis.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Episodic <span class=\"customMeta\" data-dictid=\"bc8bc758371692777185eff2ccabb7\">coronary</span> vasospasm.</p>\n<p>ECG may show <span class=\"customMeta\" data-dictid=\"a6cf2c3dc51692777200ef7fb22f69\">transient</span> ST-segment <span class=\"customMeta\" data-dictid=\"a1f256489a16927771870ddd296574\">elevation</span> during attacks.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Plaque <span class=\"customMeta\" data-dictid=\"5744dac7511692777186db6f8e0c28\">disruption</span> and increased risk of myocardial infarction.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Response to vasodilators</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Responds well.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Responds well.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Need immediate medical intervention.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"2654\" src=\"https://image.prepladder.com/content/355RsX0Kn5tFPWoT2rET1737649857.png\" width=\"4167\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old man presents to the emergency department with sudden-onset chest pain radiating to his left arm and jaw, along with diaphoresis and anxiety. His vital signs show a blood pressure of 160/90 mmHg, heart rate of 110 bpm, and oxygen saturation of 94% on room air. An ECG reveals ST-segment elevation in leads II, III, and aVF, suggestive of acute myocardial infarction (MI). Which of the following biomarkers is most reliable for confirming myocardial injury in this condition?", "options": [{"label": "A", "text": "Myoglobin", "correct": false}, {"label": "B", "text": "CK-MB (Creatine Kinase-MB)", "correct": false}, {"label": "C", "text": "Cardiac-specific troponin I (cTn I)", "correct": true}, {"label": "D", "text": "Atrial natriuretic peptide (ANP)", "correct": false}], "correct_answer": "C. Cardiac-specific troponin I (cTn I)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In a patient with acute myocardial infarction, which of the following is a characteristic change in LDH isoenzyme levels indicative of myocardial damage in this patient?", "options": [{"label": "A", "text": "Elevated LDH2 levels", "correct": false}, {"label": "B", "text": "Decreased LDH1/LDH2 ratio", "correct": false}, {"label": "C", "text": "Increased LDH2/LDH1 ratio", "correct": false}, {"label": "D", "text": "Increased LDH1/LDH2 ratio", "correct": true}], "correct_answer": "D. Increased LDH1/LDH2 ratio", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:376px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>In healthy individuals</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LDH2>>LDH1</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>In MI patients</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LDH1>>LDH2</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Isoenzymes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Location</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Isoenzymes of LDH</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LDH - 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mainly in heart & RBC</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LDH - 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>WBC, (small amounts in heart and RBC)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LDH - 3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lungs</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LDH - 4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Kidneys & Pancreas; <span class=\"customMeta\" data-dictid=\"5276da31d11692777195f0e82f5e1d\">Placenta</span> (in pregnancy)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LDH - 5</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Liver & skeletal muscles</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Isoenzymes of <span class=\"customMeta\" data-dictid=\"2ead0fd0301692777185187bd72768\">Creatinine</span> kinase</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CK - MM</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Skeletal muscle & heart</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CK - MB</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Heart</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CK - BB</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Brain</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What histopathological changes are typically observed during the reversible phase of myocardial infarction? Mitochondrial swelling Sarcolemmal disruption Relaxation of myofibrils", "options": [{"label": "A", "text": "1, 2, and 3", "correct": false}, {"label": "B", "text": "1 and 3", "correct": true}, {"label": "C", "text": "2 and 3", "correct": false}, {"label": "D", "text": "Only 3", "correct": false}], "correct_answer": "B. 1 and 3", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>HPE changes in MI</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Reversible injury</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Irreversible injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Earliest change in<br/>\n<strong>Electron microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Relaxation of myofibrils <strong>(Statement 3)</strong>, Mitochondrial swelling <strong>(Statement 1)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sarcolemmal <span class=\"customMeta\" data-dictid=\"5744dac7511692777186db6f8e0c28\">disruption</span> <strong>(Statement 2)</strong>, Mitochondrial <span class=\"customMeta\" data-dictid=\"837f5783cf1692777181d8a586fd8c\">amorphous</span> densities.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Earliest change in<br/>\n<strong>Light microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The waviness of <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> fibres and <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">myocyte</span> vacuolisation.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "At what phase of myocardial infarction does the myocardium exhibit Mottling with a yellow-tan infarct center?", "options": [{"label": "A", "text": "4-12 hours", "correct": false}, {"label": "B", "text": "1-3 days", "correct": true}, {"label": "C", "text": "7-10 days", "correct": false}, {"label": "D", "text": "4-8 weeks", "correct": false}], "correct_answer": "B. 1-3 days", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/US41GADWt8QQsBt9vHlv1736854252.png", "https://image.prepladder.com/content/kvPW4SOAqstwPcfkCmmo1736854314.png", "https://image.prepladder.com/content/ml2H3hChTkvfwsPnIdjM1736854474.png", "https://image.prepladder.com/content/HKHN6MIFIwpOmj5pE9fF1736854535.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Time </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Gross Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Light Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Electron Microscope</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Reversible Injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>0– 1/2 hour</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Relaxation of myofibrils; <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">glycogen</span> loss; mitochondrial swelling</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Irreversible Injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1/2 –4 hours</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Usually none; variable <strong>waviness</strong> of fibres at the border; <strong>myocyte</strong> <strong>vacuolisation</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_myofiber_waviness_in_myocardial_infarction.jpg\" data-tags=\"\" height=\"3263\" src=\"https://image.prepladder.com/content/US41GADWt8QQsBt9vHlv1736854252.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sarcolemmal disruption;</p>\n<p>mitochondrial <span class=\"customMeta\" data-dictid=\"837f5783cf1692777181d8a586fd8c\">amorphous</span> densities (Calcium in mitochondria)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4–12 hours<br/>\n<strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occasional dark mottling</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Early <span class=\"customMeta\" data-dictid=\"d25e3f25ed169277718419e6bab67a\">coagulative</span> necrosis, oedema, haemorrhage</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>12–24 hours</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dark mottling</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ongoing <span class=\"customMeta\" data-dictid=\"d25e3f25ed169277718419e6bab67a\">coagulative</span> necrosis; <span class=\"customMeta\" data-dictid=\"bf97c6fd301692777196300645cf12\">pyknosis</span> of nuclei; <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">myocyte</span> hypereosinophilia; marginal</p>\n<p>contraction band necrosis; early <span class=\"customMeta\" data-dictid=\"041f0e547a1692777193350b3f7d39\">neutrophilic</span> infiltrate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1–3 days<br/>\n<strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mottling with <strong>yellow-tan infarct</strong></p>\n<p>centre</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Coagulative necrosis, with loss of <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and striations; brisk <span class=\"customMeta\" data-dictid=\"f46ba26d111692777190def3b1d80a\">interstitial</span> <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> of <strong>neutrophils</strong> (Acute inflammation)</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Acute_myocardial_infarction_with_coagulative_necrosis_(4).JPG\" data-tags=\"\" height=\"3263\" src=\"https://image.prepladder.com/content/kvPW4SOAqstwPcfkCmmo1736854314.png\" width=\"4168\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3–7 days</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hyperemic border; central</p>\n<p>yellow-tan softening</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Beginning <span class=\"customMeta\" data-dictid=\"4b47ea9a2816927771864d1b0a12f9\">disintegration</span> of dead myofibers, with dying neutrophils; early <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> of dead cells by macrophages at the <span class=\"customMeta\" data-dictid=\"7d8fbc62391692777190399f2b0126\">infarct</span> border (Chronic inflammation)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>7–10 days<br/>\n<strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Maximally yellow-tan and soft, with depressed red-tan margins</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Well-developed <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> of dead cells; <strong>granulation</strong> tissue at margins (Repair)</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_granulation_tissue_with_formation_of_microvessels_in_myocardial_infarction.jpg\" data-tags=\"\" height=\"3078\" src=\"https://image.prepladder.com/content/ml2H3hChTkvfwsPnIdjM1736854474.png\" width=\"4168\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>10–14 days</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Red-gray depressed <span class=\"customMeta\" data-dictid=\"7d8fbc62391692777190399f2b0126\">infarct</span> borders</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Well-established <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue with new blood vessels and <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2–8 weeks<br/>\n<strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Grey-white scar, progressive from the border toward the core of the infarct</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition, with decreased cellularity</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>2 months</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Scarring complete</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dense <span class=\"customMeta\" data-dictid=\"79dbeeeba41692777184e63d6d214e\">collagenous</span> scar</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_dense_fibrous_scar_replacing_myocyte_loss_in_myocardial_infarction.jpg\" data-tags=\"\" height=\"3078\" src=\"https://image.prepladder.com/content/HKHN6MIFIwpOmj5pE9fF1736854535.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which histopathological feature would not be expected in the myocardium within the first 24 hours after the infarction onset?", "options": [{"label": "A", "text": "Coagulative necrosis", "correct": false}, {"label": "B", "text": "Marginal contraction band necrosis", "correct": false}, {"label": "C", "text": "Neutrophilic infiltration", "correct": false}, {"label": "D", "text": "Neovascularisation", "correct": true}], "correct_answer": "D. Neovascularisation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male with a history of hypertension and smoking presents with chest pain and shortness of breath. ECG shows ST-segment elevation in inferior leads. He undergoes PCI but, within hours, develops deteriorating cardiac function. What is the most likely primary mechanism of cardiac deterioration in this patient?", "options": [{"label": "A", "text": "Oxidative stress", "correct": false}, {"label": "B", "text": "Intracellular calcium overload", "correct": true}, {"label": "C", "text": "Activation of coagulation cascade", "correct": false}, {"label": "D", "text": "Activation of the complement system", "correct": false}], "correct_answer": "B. Intracellular calcium overload", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/bgW9BGBy8ZJ1uPAEd3nR1736854708.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old male presents with complaints of chest pain and shortness of breath. He had a history of MI one month ago, for which he received appropriate medical management. His vitals are stable, and his physical examination reveals a pericardial rub. An ECG shows diffuse ST-segment elevation. Which of the following is the most likely cause of this condition?", "options": [{"label": "A", "text": "Ventricular aneurysm", "correct": false}, {"label": "B", "text": "Dressler syndrome", "correct": true}, {"label": "C", "text": "Arrhythmia", "correct": false}, {"label": "D", "text": "Myocardial rupture", "correct": false}], "correct_answer": "B. Dressler syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following best describes using Triphenyl tetrazolium chloride (TTC) in myocardial infarction?", "options": [{"label": "A", "text": "It is used to measure blood flow in coronary arteries", "correct": false}, {"label": "B", "text": "It helps visualize viable myocardial tissue after an infarction.", "correct": true}, {"label": "C", "text": "It acts as an anticoagulant to prevent clot formation.", "correct": false}, {"label": "D", "text": "It assists in the diagnosis of arrhythmias following a heart attack.", "correct": false}], "correct_answer": "B. It helps visualize viable myocardial tissue after an infarction.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/VWHfB3K4i0sVTBnH6MyT1736854843.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 21 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following syndromes can lead to pulmonary hemorrhage in a patient and show p-ANCA positivity?", "options": [{"label": "A", "text": "Monckeberg's Sclerosis", "correct": false}, {"label": "B", "text": "Microscopic polyangiitis", "correct": true}, {"label": "C", "text": "Wegener granulomatosis", "correct": false}, {"label": "D", "text": "Polyarteritis nodosa", "correct": false}], "correct_answer": "B. Microscopic polyangiitis", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Berry aneurysm occurs due to?", "options": [{"label": "A", "text": "Endothelial injury of vessel due to HTN", "correct": false}, {"label": "B", "text": "Arterial internal elastic lamina defect", "correct": true}, {"label": "C", "text": "Endothelial layer defect", "correct": false}, {"label": "D", "text": "Adventitia defect", "correct": false}], "correct_answer": "B. Arterial internal elastic lamina defect", "question_images": [], "explanation_images": [], "explanation": "\n<table>\n<thead>\n<tr>\n<td>\n<p style=\"text-align: center;\"><strong>Term</strong></p>\n</td>\n<td>\n<p style=\"text-align: center;\"><strong>Definition</strong></p>\n</td>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n<p>Berry Aneurysm</p>\n</td>\n<td>\n<p>Localized outpouchings or dilations of blood vessels in the brain, typically at arterial bifurcations or branch points. Also known as <span class=\"customMeta\" data-dictid=\"cd42e0ddad1692777190d18c595ec5\">intracranial</span> or <span class=\"customMeta\" data-dictid=\"df4e8e3ae81692777198a0513bc88c\">saccular</span> aneurysms.</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\">\n<p>Underlying Cause</p>\n</td>\n<td>\n<p>Arterial internal <span class=\"customMeta\" data-dictid=\"2dba7c03f61692777187254f866bcc\">elastic</span> <span class=\"customMeta\" data-dictid=\"9864ad42b21692777191febeee1002\">lamina</span> defect</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Weakening of the vessel wall due to a structural <span class=\"customMeta\" data-dictid=\"359a8718a61692777185568ac80abb\">defect</span> in the arterial internal <span class=\"customMeta\" data-dictid=\"2dba7c03f61692777187254f866bcc\">elastic</span> lamina, leading to <span class=\"customMeta\" data-dictid=\"f2c92eaffe16927771819978aa5666\">aneurysm</span> formation.</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\">\n<p>Associated Factors</p>\n<p> </p>\n</td>\n<td>\n<p>Genetic predisposition</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Smoking</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Hypertension (can increase the risk of <span class=\"customMeta\" data-dictid=\"e73553a3a5169277719787fd5f4680\">rupture</span> in pre-existing aneurysms)</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\">\n<p>Clinical Presentation</p>\n</td>\n<td>\n<p>Often <span class=\"customMeta\" data-dictid=\"d1a9a79f701692777182066af09044\">asymptomatic</span> until <span class=\"customMeta\" data-dictid=\"e73553a3a5169277719787fd5f4680\">rupture</span> occurs</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Ruptured aneurysms can cause <span class=\"customMeta\" data-dictid=\"0a5d82eeef169277719934b86fb07b\">subarachnoid</span> <span class=\"customMeta\" data-dictid=\"4642acfc0c16927771880b34fa5174\">hemorrhage</span> (bleeding into the space surrounding the brain)</p>\n</td>\n</tr>\n<tr>\n<td> </td>\n<td>\n<p>Unruptured aneurysms may be detected incidentally on <span class=\"customMeta\" data-dictid=\"fe3220767716927771892419444041\">imaging</span> studies or can present with symptoms such as headache, visual disturbances, or neurological deficits</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\">\n<p>Diagnostic Evaluation</p>\n</td>\n<td>\n<p>Imaging studies: CT scan, MRI, cerebral angiography</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Cerebral <span class=\"customMeta\" data-dictid=\"c67cc1bcd3169277718150b3c9d6ab\">angiography</span> is considered the gold standard for diagnosing and evaluating the characteristics of the aneurysm, such as size, location, and shape</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\">\n<p>Treatment</p>\n<p> </p>\n</td>\n<td>\n<p>Management depends on various factors, including <span class=\"customMeta\" data-dictid=\"f2c92eaffe16927771819978aa5666\">aneurysm</span> size, location, and patient-specific considerations</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Options may include observation, <span class=\"customMeta\" data-dictid=\"81d12f9cb01692777199e44ff3f3c1\">surgical</span> clipping, or <span class=\"customMeta\" data-dictid=\"0dc32a9edf1692777187a82b199252\">endovascular</span> coiling (minimally <span class=\"customMeta\" data-dictid=\"1c5272ad3d1692777190e71409d07a\">invasive</span> procedure to seal off the aneurysm)</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Ruptured aneurysms require urgent medical attention and may involve emergency intervention to prevent further <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> and minimize neurological damage</p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old man was admitted to the emergency ward with severe, sudden-onset chest pain radiating to the left arm and profuse sweating. The ECG showed ST-segment elevation in precordial leads. The person succumbed after 3 hours. During the autopsy, his heart was taken out and immersed in a solution. The normal area of the heart turned brick-red, whereas the infarcted portion turned pale. Which of the following is a likely component of the solution?", "options": [{"label": "A", "text": "Formalin", "correct": false}, {"label": "B", "text": "Triphenyl tetrazolium chloride", "correct": true}, {"label": "C", "text": "Ethanol", "correct": false}, {"label": "D", "text": "Glutaraldehyde", "correct": false}], "correct_answer": "B. Triphenyl tetrazolium chloride", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/4bxrnYYoOi23npo0LFhY1746697158.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "How is thrombosis initiated?", "options": [{"label": "A", "text": "Platelet activation", "correct": false}, {"label": "B", "text": "Endothelial injury", "correct": true}, {"label": "C", "text": "Coagulation cascade", "correct": false}, {"label": "D", "text": "Vasoconstriction of vessels", "correct": false}], "correct_answer": "B. Endothelial injury", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following features does the histology of the reperfused myocardium show?", "options": [{"label": "A", "text": "Wavy fibres", "correct": false}, {"label": "B", "text": "Neutrophils in cardiac muscle", "correct": false}, {"label": "C", "text": "Swelling of cells", "correct": false}, {"label": "D", "text": "Eosinophilic contraction band", "correct": true}], "correct_answer": "D. Eosinophilic contraction band", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/WHLb5SlHwNPvUeN1N5qh1746438905.png", "https://image.prepladder.com/notes/qbsV8wnsUo0Vnmm6mvls1746439338.png", "https://image.prepladder.com/notes/xtuXr8HsZRobY5vpOYUf1746439661.png", "https://image.prepladder.com/notes/ucN69SfUl8r5mwV8NFKa1746439812.png", "https://image.prepladder.com/notes/RnJRBMINeTgN0xfJrclr1746439933.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Time </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Gross Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Light Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Electron Microscope</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Reversible Injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>0– 1/2 hour</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Relaxation of myofibrils; <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">glycogen</span> loss; mitochondrial swelling</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Irreversible Injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1/2 –4 hours</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Usually none; variable waviness of fibres at the border; <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">myocyte</span> vacuolisation</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"PA206\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"11895\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_myofiber_waviness_in_myocardial_infarction.jpg\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/qbsV8wnsUo0Vnmm6mvls1746439338.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sarcolemmal disruption;</p>\n<p>mitochondrial <span class=\"customMeta\" data-dictid=\"837f5783cf1692777181d8a586fd8c\">amorphous</span> densities (Calcium in mitochondria)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>4–12 hours</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Occasional dark mottling</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Early <span class=\"customMeta\" data-dictid=\"d25e3f25ed169277718419e6bab67a\">coagulative</span> necrosis, oedema, haemorrhage</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>12–24 hours</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dark mottling</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Ongoing <span class=\"customMeta\" data-dictid=\"d25e3f25ed169277718419e6bab67a\">coagulative</span> necrosis; <span class=\"customMeta\" data-dictid=\"bf97c6fd301692777196300645cf12\">pyknosis</span> of nuclei; <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">myocyte</span> hypereosinophilia; marginal</p>\n<p>contraction band necrosis; early <span class=\"customMeta\" data-dictid=\"041f0e547a1692777193350b3f7d39\">neutrophilic</span> infiltrate</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1–3 days</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Mottling with yellow-tan infarct</p>\n<p>centre</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Coagulative necrosis, with loss of <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and striations; brisk <span class=\"customMeta\" data-dictid=\"f46ba26d111692777190def3b1d80a\">interstitial</span> <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> of neutrophils (Acute inflammation)</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"PA207\" data-author=\"NA\" data-hash=\"11900\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Acute_myocardial_infarction_with_coagulative_necrosis_(4).JPG\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/xtuXr8HsZRobY5vpOYUf1746439661.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>3–7 days</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hyperemic border; central</p>\n<p>yellow-tan softening</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Beginning <span class=\"customMeta\" data-dictid=\"4b47ea9a2816927771864d1b0a12f9\">disintegration</span> of dead myofibers, with dying neutrophils; early <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> of dead cells by macrophages at the <span class=\"customMeta\" data-dictid=\"7d8fbc62391692777190399f2b0126\">infarct</span> border (Chronic inflammation)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>7–10 days</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Maximally yellow-tan and soft, with depressed red-tan margins</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Well-developed <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> of dead cells; <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue at margins (Repair)</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"PA208 \" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"11903\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_granulation_tissue_with_formation_of_microvessels_in_myocardial_infarction.jpg\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/ucN69SfUl8r5mwV8NFKa1746439812.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>10–14 days</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Red-gray depressed <span class=\"customMeta\" data-dictid=\"7d8fbc62391692777190399f2b0126\">infarct</span> borders</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Well-established <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue with new blood vessels and <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>2–8 weeks</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Grey-white scar, progressive from the border toward the core of the infarct</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition, with decreased cellularity</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>>2 months</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Scarring complete</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dense <span class=\"customMeta\" data-dictid=\"79dbeeeba41692777184e63d6d214e\">collagenous</span> scar</p>\n<figure class=\"caption_element\"><img alt=\"PA209\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"11906\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_dense_fibrous_scar_replacing_myocyte_loss_in_myocardial_infarction.jpg\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/RnJRBMINeTgN0xfJrclr1746439933.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 3-year-old child has been brought to the hospital with complaints of fever, rash, and swelling of her hands and feet for the past 5 days. There is desquamative skin rash, edema of hands and feet, erythema of palms and soles, oral erythema, and cervical lymphadenopathy. What is the likely condition?", "options": [{"label": "A", "text": "Kawasaki disease", "correct": true}, {"label": "B", "text": "Measles", "correct": false}, {"label": "C", "text": "Scarlet fever", "correct": false}, {"label": "D", "text": "Henoch-Schonlein purpura", "correct": false}], "correct_answer": "A. Kawasaki disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/CruhcCT59IerysqIFaKr1746438118.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Large, friable, irregular vegetation on heart valves is seen in which condition?", "options": [{"label": "A", "text": "Infective endocarditis", "correct": true}, {"label": "B", "text": "Rheumatic heart disease", "correct": false}, {"label": "C", "text": "Libman-Sacks endocarditis", "correct": false}, {"label": "D", "text": "Non-bacterial thrombotic carditis", "correct": false}], "correct_answer": "A. Infective endocarditis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/OjwtVbp6ouzJAnxTn62v1745218092.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:606px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Vegetations and site</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Rheumatic heart disease</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Small, <strong>warty, <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> </strong>vegetations along the line of <span class=\"customMeta\" data-dictid=\"2b4569285f1692777184282b1ca3f1\">closure</span> of <span class=\"customMeta\" data-dictid=\"416dd1004a169277720177d9a6adc5\">valve</span> leaflets.</p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Infective Endocarditis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Large, bulky, infected, friable, </strong>irregular mass along the line of <span class=\"customMeta\" data-dictid=\"2b4569285f1692777184282b1ca3f1\">closure</span> or on valvular cusps, more on the atrial side.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Non-bacterial Thrombotic Endocarditis</strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Small, bland, <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> </strong>vegetation along the line of closure.</p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Libman-Sacks Endocarditis</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Small or medium-sized <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> vegetations on <strong>either or both sides </strong>of valvular leaflets,<strong> most commonly on the lower side.</strong></p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 34-year-old female patient presented to the outpatient department with migratory arthritis, and examination revealed a pan-systolic murmur. An echocardiography was performed, which was suggestive of mitral regurgitation. A biopsy specimen was obtained, and the image is provided below. What is the most likely lesion shown in the histopathology slide?", "options": [{"label": "A", "text": "Aschoff’s bodies", "correct": true}, {"label": "B", "text": "Epithelioid granuloma", "correct": false}, {"label": "C", "text": "Granulomatous vasculitis", "correct": false}, {"label": "D", "text": "Granuloma inguinale", "correct": false}], "correct_answer": "A. Aschoff’s bodies", "question_images": ["https://image.prepladder.com/content/WQXOwPoCRKEzJb5vnai61745411278.png"], "explanation_images": ["https://image.prepladder.com/content/F6HfGdokKglXLo4kZEPv1745411323.png", "https://image.prepladder.com/content/dsAPAvd083qNxMCXnIir1745411329.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:600px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Histopathological features of RHD</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Aschoff bodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>They<strong> </strong>are <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> areas of <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> with <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of lymphocytes, <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells and activated macrophages or histiocytes.</li>\n<li>An <span class=\"customMeta\" data-dictid=\"9ec09a7cfc169277718700e4dcac4e\">endomyocardial</span> <span class=\"customMeta\" data-dictid=\"754ab07a2e1692777183ed178c883d\">biopsy</span> showing Aschoff's bodies helps in confirming the diagnosis of RHD.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Rheumatic_heart_disease_-_3b_-_very_high_mag.jpg\" data-tags=\"\" height=\"207\" src=\"https://image.prepladder.com/content/F6HfGdokKglXLo4kZEPv1745411323.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anitschkow cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>They<strong> </strong>are activated macrophages with elongated and wavy <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> commonly found within Aschoff bodies.</li>\n<li>They appear as caterpillars in <span class=\"customMeta\" data-dictid=\"7ba18aa5e616927771918a45051a40\">longitudinal</span> sections <strong>(hence also called <span class=\"customMeta\" data-dictid=\"526cf2c9fd16927771835ecd31fb31\">Caterpillar</span> cells)</strong> and owls in cross sections.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Ed Uthman\" data-hash=\"\" data-license=\"CC BY SA 2.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Anitschkow_Myocytes_in_an_Aschoff_Body,_Rheumatic_Myocarditis.jpg\" data-tags=\"\" height=\"314\" src=\"https://image.prepladder.com/content/dsAPAvd083qNxMCXnIir1745411329.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Fibrinoid <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>This is<strong> </strong>seen in areas of the valves affected by inflammation.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Granulation tissue is seen in cases of repair. It comprises proliferating blood vessels, <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells and fibroblasts.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child is presenting with palpable blanching purpura, abdominal pain, and pain in the knee joint resulting from arthritis. Urine examination showed hematuria and proteinuria. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Immune thrombocytopenic purpura", "correct": false}, {"label": "B", "text": "Dengue", "correct": false}, {"label": "C", "text": "Churg-Strauss syndrome", "correct": false}, {"label": "D", "text": "Henoch-Schonlein purpura", "correct": true}], "correct_answer": "D. Henoch-Schonlein purpura", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:637px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Henoch-Schönlein <span class=\"customMeta\" data-dictid=\"0acd34c758169277719644923511e5\">Purpura</span> (IgA vasculitis)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>It is a <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"fcb3e0d7911692777201ffb9695dea\">vasculitis</span> characterised by <strong>inflammation of small blood vessels</strong>, primarily affecting <strong>children,</strong> but can also occur in adults.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Etiology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Often follows upper <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> <span class=\"customMeta\" data-dictid=\"1a1307223f16927772017a994bfc39\">tract</span> infections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pathology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Immune complex deposition of <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> in small blood vessels leads to inflammation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Inflammation of small blood vessels</strong> primarily affects <strong>children</strong> but can also occur in adults.</li>\n<li>Associated with <strong>elevated <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> levels</strong></li>\n<li><strong>Skin</strong>: <span class=\"customMeta\" data-dictid=\"bd478e4ff816927771949528846af9\">Palpable</span> purpura, most prominently on the lower limbs and buttocks.</li>\n<li><strong>Musculoskeletal</strong>: <span class=\"customMeta\" data-dictid=\"7fbf2bac0e1692777182ab459be337\">Arthralgia</span> or arthritis, often <span class=\"customMeta\" data-dictid=\"a6cf2c3dc51692777200ef7fb22f69\">transient</span> and non-deforming.</li>\n<li><strong>Gastrointestinal</strong>: <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">Abdominal</span> pain, nausea, vomiting, and sometimes <span class=\"customMeta\" data-dictid=\"b3a647ce2516927771881427f56c1d\">gastrointestinal</span> bleeding, <span class=\"customMeta\" data-dictid=\"ecba80da7b1692777190a1ae56e0a7\">Intussusception</span> is a severe but rare complication.</li>\n<li><strong>Renal</strong>: Hematuria, proteinuria, and <span class=\"customMeta\" data-dictid=\"248111ded81692777197946454db52\">red blood cell</span> casts in urine.</li>\n<li>It can progress to <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> <span class=\"customMeta\" data-dictid=\"b06dd1c5181692777193f14f3ed7d7\">nephropathy</span> in severe cases.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Management </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Supportive care</strong>: Hydration, rest, and pain management with NSAIDs for arthralgia.</li>\n<li><strong>Glucocorticoids</strong>: For severe <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> pain, <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> involvement, or <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> symptoms.</li>\n<li><strong>Intussusception</strong>: <span class=\"customMeta\" data-dictid=\"81d12f9cb01692777199e44ff3f3c1\">Surgical</span> intervention if required.</li>\n<li><strong>Nephritis</strong>: Immunosuppressants (e.g., cyclophosphamide) in severe cases.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the gold standard investigation for the diagnosis of myocarditis?", "options": [{"label": "A", "text": "Endo-myocardial biopsy", "correct": true}, {"label": "B", "text": "Magnetic Resonance Imaging", "correct": false}, {"label": "C", "text": "Brain Natriuretic Peptide", "correct": false}, {"label": "D", "text": "LDH1 to LDH2 ratio", "correct": false}], "correct_answer": "A. Endo-myocardial biopsy", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Myocarditis</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>It is a diverse group of <span class=\"customMeta\" data-dictid=\"e32252a2c41692777194fe542b3e35\">pathologic</span> entities in which <span class=\"customMeta\" data-dictid=\"aa279cf1f016927771903f195bb1b9\">infectious</span> microorganisms and/or a primary <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> process cause myocardial injury.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pathogenesis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Infections:</strong></p>\n<ul>\n<li>Viruses (e.g., Coxsackievirus, Echovirus, Influenza, HIV, Cytomegalovirus)</li>\n<li>Chlamydiae (e.g., <span class=\"customMeta\" data-dictid=\"e6f8a1702216927771844ab8a5d465\">Chlamydophila</span> psittaci)</li>\n<li>Rickettsiae (e.g., <span class=\"customMeta\" data-dictid=\"d39294c67d16927771970f0119c9d1\">Rickettsia</span> typhi, <span class=\"customMeta\" data-dictid=\"2b3121f9de1692777201f8f08c152e\">Typhus</span> fever)</li>\n<li>Bacteria (e.g., <span class=\"customMeta\" data-dictid=\"5c14de20c01692777185f63bede46f\">Corynebacterium</span> diphtheriae, <span class=\"customMeta\" data-dictid=\"a3acbdadb41692777193612b704230\">Neisseria</span> meningococcus, Borrelia)</li>\n<li>Fungi (e.g., Candida) <span class=\"customMeta\" data-dictid=\"b87627c189169277719689567ed39e\">Protozoa</span> (e.g., <span class=\"customMeta\" data-dictid=\"de1ef739ba1692777200ad86bcb682\">Trypanosoma</span> cruzi [Chagas disease], toxoplasmosis) Helminths (e.g., Trichinosis)</li>\n</ul>\n<p> </p>\n<p><strong>Immune-Mediated Reactions</strong></p>\n<ul>\n<li>Postviral</li>\n<li>Poststreptococcal (Rheumatic fever)</li>\n<li>Systemic <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">lupus</span> erythematosus</li>\n<li>Drug <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> (e.g., methyldopa, sulfonamides)</li>\n<li>Transplant rejection</li>\n<li>Immune <span class=\"customMeta\" data-dictid=\"cd249aae061692777184c11176df48\">checkpoint</span> <span class=\"customMeta\" data-dictid=\"b5fb56a28b1692777190396ae8b625\">inhibitor</span> therapies</li>\n</ul>\n<p> </p>\n<p><strong>Unknown</strong></p>\n<ul>\n<li>Sarcoidosis</li>\n<li>Giant cell myocarditis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>It can be <span class=\"customMeta\" data-dictid=\"d1a9a79f701692777182066af09044\">asymptomatic</span> (recovery without sequelae)</li>\n<li>Heart failure</li>\n<li>Arrhythmias</li>\n<li>Sudden death</li>\n<li>Symptoms include fatigue, dyspnea, palpitations, precordial discomfort, and fever.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:614px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type of Carditis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pericarditis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Inflammation of the <span class=\"customMeta\" data-dictid=\"56ab21797f16927771954b343891ef\">pericardium</span> with <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells (e.g., lymphocytes) and fibrinous exudate.</li>\n<li>It can lead to fibrinous or serofibrinous <span class=\"customMeta\" data-dictid=\"607e653eef1692777195e56becea2c\">pericarditis</span> with <span class=\"customMeta\" data-dictid=\"468709afe3169277720301878d09fd\">friction</span> rub.</li>\n<li>Chronicity may cause <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> adhesions, leading to <span class=\"customMeta\" data-dictid=\"49386582661692777185faf9eaa8d8\">constrictive</span> <span class=\"customMeta\" data-dictid=\"607e653eef1692777195e56becea2c\">pericarditis</span> and impaired <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> filling.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Myocarditis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Inflammation of the <span class=\"customMeta\" data-dictid=\"c64e23ddb8169277719344010b3fc0\">myocardium</span> with <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells (e.g., lymphocytes, macrophages).</li>\n<li>It may show <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">myocyte</span> necrosis, <span class=\"customMeta\" data-dictid=\"f46ba26d111692777190def3b1d80a\">interstitial</span> oedema, and <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> infiltrates.</li>\n<li>Severe cases can progress to myocardial fibrosis, dilated cardiomyopathy, and heart failure.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Endocarditis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Inflammation of the endocardium, especially affecting heart valves.</li>\n<li>Features <span class=\"customMeta\" data-dictid=\"4b7a26ed2d1692777182e7b7bbcb72\">bacterial vegetations</span> of fibrin, platelets, and <span class=\"customMeta\" data-dictid=\"04f4b6dbf71692777192ca0c4f70fa\">microbial</span> colonies, which can <span class=\"customMeta\" data-dictid=\"f30224cb791692777187d1ea81e717\">erode</span> tissues, causing valvular destruction, <span class=\"customMeta\" data-dictid=\"fe7835b0b81692777184173c09d7a5\">chordae</span> tendineae rupture, or myocardial abscess.</li>\n<li>Chronic <span class=\"customMeta\" data-dictid=\"33812b7bb0169277718707b5473b45\">endocarditis</span> leads to <span class=\"customMeta\" data-dictid=\"416dd1004a169277720177d9a6adc5\">valve</span> thickening, incompetence, or stenosis.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presented with complaints of dyspnea on exertion for 1 month. Echocardiography showed the presence of mitral stenosis and left ventricular hypertrophy. Identify the histopathological finding given below and the probable diagnosis.", "options": [{"label": "A", "text": "Aschoff body; Rheumatic heart disease", "correct": true}, {"label": "B", "text": "Calcification of valve; Mitral stenosis", "correct": false}, {"label": "C", "text": "Granuloma; Sarcoidosis", "correct": false}, {"label": "D", "text": "Non-caseating granuloma; Tuberculosis", "correct": false}], "correct_answer": "A. Aschoff body; Rheumatic heart disease", "question_images": ["https://image.prepladder.com/notes/Rz9kh7wGFPy8NJNboopr1745313911.jpg"], "explanation_images": ["https://image.prepladder.com/notes/Ples3Pt5PE90bOZvJx0p1745313972.png", "https://image.prepladder.com/notes/TzJRZ9YnUJxlANFB7IE71745314024.png", "https://image.prepladder.com/notes/kyXcJCOJYPDf2WwvlBfM1747053129.jpg", "https://image.prepladder.com/notes/eU7moRpMJvuaZBZOv9of1745314176.jpg", "https://image.prepladder.com/notes/iTZQteq6oUjvmrLWRs461747735609.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old football player is brought to the emergency department after he collapsed due to sudden cardiac arrest. Based on the biopsy findings of his cardiac tissue, what is the most likely cause of his death?", "options": [{"label": "A", "text": "Hypertrophic obstructive cardiomyopathy", "correct": true}, {"label": "B", "text": "Dilated cardiomyopathy", "correct": false}, {"label": "C", "text": "Restrictive cardiomyopathy", "correct": false}, {"label": "D", "text": "Arrhythmogenic cardiomyopathy", "correct": false}], "correct_answer": "A. Hypertrophic obstructive cardiomyopathy", "question_images": ["https://image.prepladder.com/content/fchKctLx2qz5Rh9EirZB1724761362.png"], "explanation_images": ["https://image.prepladder.com/content/hBXMYvS6kVNEwEbJXfse1724761465.png", "https://image.prepladder.com/content/BD3XHpfbqGsIFgZksBDU1724761483.png"], "explanation": "<p>Correct Option A - Hypertrophic obstructive cardiomyopath\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old patient presents with colicky abdominal pain, joint pain, and palpable purpura. Urinalysis shows only red blood cells with no other significant findings. Which of the following is the likely diagnosis?", "options": [{"label": "A", "text": "IgA vasculitis", "correct": true}, {"label": "B", "text": "Granulomatosis with polyangiitis", "correct": false}, {"label": "C", "text": "Microscopic polyangiitis", "correct": false}, {"label": "D", "text": "Behçet's disease", "correct": false}], "correct_answer": "A. IgA vasculitis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the earliest marker to rise in a case of myocardial infarction (MI)?", "options": [{"label": "A", "text": "CKMB (Creatine Kinase-MB)", "correct": false}, {"label": "B", "text": "Troponin", "correct": false}, {"label": "C", "text": "LDH", "correct": false}, {"label": "D", "text": "Heart fatty acid binding protein", "correct": true}], "correct_answer": "D. Heart fatty acid binding protein", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Cardiac Markers</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cardiac Troponin</strong></p>\n<p><strong>(Troponin T and I) </strong><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Preferred biochemical markers</strong> due to their sensitivity and specificity.</li>\n<li><strong>Troponin levels:</strong>\n<ul>\n<li>Increase within 3-6 hours.</li>\n<li>Peak at around 36 hours.</li>\n<li>Remains elevated for<strong> </strong>7-10 days after STEMI.</li>\n</ul>\n</li>\n<li>Troponin should be measured at presentation and repeated at 1-3 hours (high-sensitivity assays) or 3-6 hours (conventional assays).</li>\n<li>Cardiac <span class=\"customMeta\" data-dictid=\"69d29372dc169277720014447abea8\">troponin</span> levels remain elevated for several days after an <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> myocardial <span class=\"customMeta\" data-dictid=\"77aed446d2169277719007f42bf052\">infarction</span> (AMI), making them unreliable for detecting reinfarction.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Creatine Phosphokinase (CK) and CK-MB</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>CK rises within 4-8 hours.</li>\n<li>Peaks by 24 hours.</li>\n<li>Returns to normal within 48-72 hours.</li>\n<li>CK-MB elevated:\n\t\t\t\t<ul>\n<li>Cardiac surgery</li>\n<li>Myocarditis</li>\n<li>Electrical cardioversion</li>\n</ul>\n</li>\n<li>CK-MB levels normalise within 48 to 72 hours, so a subsequent rise can confirm reinfarction.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lactate Dehydrogenase (LDH) </strong><strong>(Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Increase in the blood 6 to 12 hours after ACS.</li>\n<li>Peak within 24 to 72 hours.</li>\n<li>Normalise within 8 to 14 days.</li>\n<li>LDH is no longer used to diagnose myocardial <span class=\"customMeta\" data-dictid=\"77aed446d2169277719007f42bf052\">infarction</span> because it is not specific to <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> myocytes.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Heart-type <span class=\"customMeta\" data-dictid=\"bc6cd9a9f9169277720261812ea113\">Fatty</span> Acid-Binding Protein (H-FABP)</strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It is the <strong>earliest marker to rise</strong> in a case of myocardial <span class=\"customMeta\" data-dictid=\"77aed446d2169277719007f42bf052\">infarction</span> (MI).</li>\n<li>It has higher sensitivity than <span class=\"customMeta\" data-dictid=\"69d29372dc169277720014447abea8\">troponin</span> and CK-MB for detecting AMI within 4 hours of symptom onset, but its <span class=\"customMeta\" data-dictid=\"e70dd3ea9916927771988faba61d64\">specificity</span> is lower.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cardiac Enzyme</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Time to rise</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H-FABP(Heart <span class=\"customMeta\" data-dictid=\"bc6cd9a9f9169277720261812ea113\">fatty</span> acid binding protein)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Within 1 hour</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Troponin T and I</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2-4 hrs</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CK-MB</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2-4 hrs</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LDH1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>24 hrs</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old child presents with fever, fatigue, and left ventricular dysfunction. An endomyocardial biopsy is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute rheumatic fever", "correct": false}, {"label": "B", "text": "Chagas cardiomyopathy", "correct": false}, {"label": "C", "text": "Pyogenic myocarditis", "correct": false}, {"label": "D", "text": "Lymphocytic myocarditis", "correct": true}], "correct_answer": "D. Lymphocytic myocarditis", "question_images": ["https://image.prepladder.com/notes/loUHX3atK0fdTinIeW6h1745907694.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 34-year-old female patient presented to the outpatient department with migratory arthritis, and examination revealed a pan-systolic murmur. An echocardiography was performed, which was suggestive of mitral regurgitation. A biopsy specimen was obtained, and the image is provided below. What is the most likely lesion shown in the histopathology slide?", "options": [{"label": "A", "text": "Aschoff’s bodies", "correct": true}, {"label": "B", "text": "Epithelioid granuloma", "correct": false}, {"label": "C", "text": "Granulomatous vasculitis", "correct": false}, {"label": "D", "text": "Granuloma inguinale", "correct": false}], "correct_answer": "A. Aschoff’s bodies", "question_images": ["https://image.prepladder.com/content/tse0XXTVKVU6AETQvBLf1746427209.png"], "explanation_images": ["https://image.prepladder.com/content/o6sRIQHSwcZO5bMD4mB81746427271.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old man dies due to a myocardial infarction. Which stains can be used to see the infarct in the heart while conducting an autopsy?", "options": [{"label": "A", "text": "Oil Red O", "correct": false}, {"label": "B", "text": "Triphenyl tetrazolium chloride", "correct": true}, {"label": "C", "text": "Sudan black B", "correct": false}, {"label": "D", "text": "Masson's trichrome", "correct": false}], "correct_answer": "B. Triphenyl tetrazolium chloride", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Dvdsf4zP3WvwiCqoJYcs1746428131.png", "https://image.prepladder.com/content/GbWUbIIs4g8fxEc1qIYq1746428142.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following histopathological findings is not seen 12 hours after an ischemic injury to the heart?", "options": [{"label": "A", "text": "Karyorrhexis of myocytes", "correct": false}, {"label": "B", "text": "Neocapillary invasion of myocytes", "correct": false}, {"label": "C", "text": "Hyper-eosinophilia of myocytes", "correct": true}, {"label": "D", "text": "Coagulation necrosis of myocytes", "correct": false}], "correct_answer": "C. Hyper-eosinophilia of myocytes", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/1nZNP6Hpiubn6zpRGxaD1747909330.png", "https://image.prepladder.com/notes/HBqftxsFEAiNeRDXcIuc1747909062.png", "https://image.prepladder.com/notes/vTSgfEWM3vFpwMUqnLZ01747909469.png", "https://image.prepladder.com/notes/f6xVtu6WncNpoRjV8iJZ1747909568.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Time </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Gross Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Light Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Electron Microscope</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Reversible Injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>0– 1/2 hour</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Relaxation of myofibrils; <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">glycogen</span> loss; mitochondrial swelling</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Irreversible Injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1/2 –4 hours</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Usually none; variable waviness of fibres at the border; <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">myocyte</span> vacuolisation</p>\n<figure class=\"caption_element\"><img alt=\" MI Waviness of fibres\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"13162\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_myofiber_waviness_in_myocardial_infarction.jpg\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/1nZNP6Hpiubn6zpRGxaD1747909330.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sarcolemmal disruption;</p>\n<p>mitochondrial <span class=\"customMeta\" data-dictid=\"837f5783cf1692777181d8a586fd8c\">amorphous</span> densities (Calcium in mitochondria)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>4–12 hours<br/>\n\t\t\t </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Occasional dark mottling</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Early <span class=\"customMeta\" data-dictid=\"d25e3f25ed169277718419e6bab67a\">coagulative</span> necrosis, oedema, haemorrhage</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>12–24 hours</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dark mottling</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Ongoing <span class=\"customMeta\" data-dictid=\"d25e3f25ed169277718419e6bab67a\">coagulative</span> necrosis; <span class=\"customMeta\" data-dictid=\"bf97c6fd301692777196300645cf12\">pyknosis</span> of nuclei; <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">myocyte</span> hypereosinophilia; marginal <span class=\"customMeta\" data-dictid=\"ca2289e348169277718516017eb2ba\">contraction</span> band necrosis; early <span class=\"customMeta\" data-dictid=\"041f0e547a1692777193350b3f7d39\">neutrophilic</span> infiltrate</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1–3 days<br/>\n\t\t\t </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Mottling with yellow-tan infarct</p>\n<p>centre</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Coagulative necrosis, with loss of <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and striations; brisk <span class=\"customMeta\" data-dictid=\"f46ba26d111692777190def3b1d80a\">interstitial</span> <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> of neutrophils (Acute inflammation)</p>\n<p> </p>\n<figure class=\"caption_element\"><img alt=\"MI Neutrophil infiltration\" data-author=\"NA\" data-hash=\"13161\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Acute_myocardial_infarction_with_coagulative_necrosis_(4).JPG\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/HBqftxsFEAiNeRDXcIuc1747909062.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>3–7 days</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hyperemic border; central</p>\n<p>yellow-tan softening</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Beginning <span class=\"customMeta\" data-dictid=\"4b47ea9a2816927771864d1b0a12f9\">disintegration</span> of dead myofibers, with dying neutrophils; early <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> of dead cells by macrophages at the <span class=\"customMeta\" data-dictid=\"7d8fbc62391692777190399f2b0126\">infarct</span> border (Chronic inflammation)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>7–10 days<br/>\n\t\t\t </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Maximally yellow-tan and soft, with depressed red-tan margins</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Well-developed <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> of dead cells; <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue at margins (Repair)</p>\n<figure class=\"caption_element\"><img alt=\"MI Well developed granulation tissue\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"13163\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_granulation_tissue_with_formation_of_microvessels_in_myocardial_infarction.jpg\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/vTSgfEWM3vFpwMUqnLZ01747909469.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>10–14 days</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Red-gray depressed <span class=\"customMeta\" data-dictid=\"7d8fbc62391692777190399f2b0126\">infarct</span> borders</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Well-established <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue with new blood vessels and <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>2–8 weeks<br/>\n\t\t\t </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Grey-white scar, progressive from the border toward the core of the infarct</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition, with decreased cellularity.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>>2 months</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Scarring complete</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dense <span class=\"customMeta\" data-dictid=\"79dbeeeba41692777184e63d6d214e\">collagenous</span> scar</p>\n<figure class=\"caption_element\"><img alt=\"MI Dense collagenous scar\" data-author=\"Katarzyna Michaud, Cristina Basso, Giulia d’Amati, Carla Giordano, Ivana Kholová, Stephen D. Preston, Stefania Rizzo, Sara Sabatasso, Mary N. Sheppard, Aryan Vink, Allard C. van der Wal & on behalf of the Association for European Cardiovascular Pathology (AECVP)\" data-hash=\"13164\" data-license=\"CC BY 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_dense_fibrous_scar_replacing_myocyte_loss_in_myocardial_infarction.jpg\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/f6xVtu6WncNpoRjV8iJZ1747909568.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old athlete suddenly collapsed while playing football and was taken to the hospital, where he was declared dead. His autopsy image is given below. Which of the following is the most likely cause of death?", "options": [{"label": "A", "text": "Valvular heart disease due to RHD", "correct": false}, {"label": "B", "text": "Sudden cardiac death due to arrhythmia", "correct": false}, {"label": "C", "text": "Sudden cardiac death due to hypertrophic cardiomyopathy", "correct": true}, {"label": "D", "text": "Sudden cardiac death due to atherosclerosis", "correct": false}], "correct_answer": "C. Sudden cardiac death due to hypertrophic cardiomyopathy", "question_images": ["https://image.prepladder.com/notes/DqaryOJBBCGGRhXEgjqR1747054821.png"], "explanation_images": [], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>Sudden <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">Cardiac</span> Death (SCD)</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>Sudden <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">Cardiac</span> Death (SCD) is defined as unexpected death occurring within an hour of symptom onset due to <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> causes, including unwitnessed deaths in individuals who seemed healthy within the last 24 hours.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Risk Factors</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Structural Heart Disease: The presence of structural heart issues or inherited <span class=\"customMeta\" data-dictid=\"5280ec6ae91692777182aa6322ae68\">arrhythmia</span> syndromes significantly increases SCD risk.</li>\n<li>Major Risk Factors:</li>\n</ul>\n<ul>\n<li>Coronary Heart Disease (CHD)</li>\n<li>Heart Failure</li>\n<li>Diabetes</li>\n<li>Hypertension</li>\n<li>Smoking</li>\n<li>Family History of SCD</li>\n</ul>\n<p> </p>\n<h3>In Athletes</h3>\n<ul>\n<li>Younger Athletes: The leading causes of SCD are inherited <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> conditions, particularly Hypertrophic <span class=\"customMeta\" data-dictid=\"6e6dd7aed216927771831ebdf9703c\">Cardiomyopathy</span> (HCM). (Option C)</li>\n<li>Older Athletes: Risks are primarily associated with atherosclerotic <span class=\"customMeta\" data-dictid=\"bc8bc758371692777185eff2ccabb7\">coronary</span> <span class=\"customMeta\" data-dictid=\"a66cd3adaa1692777182e77cb23021\">artery</span> disease (CAD).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Precipitating Factors</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>SCD and Sudden <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">Cardiac</span> Arrest (SCA) frequently occur at specific times (e.g., mornings, winter months) and in public places.</li>\n<li>Vigorous exertion, especially in men, can trigger SCD; however, regular exercise may reduce this risk.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Underlying Heart Disease</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>The most common cause of SCD is <span class=\"customMeta\" data-dictid=\"fc8cac43cc16927772015049bb5ab8\">Ventricular</span> fibrillation</li>\n<li>Many SCD cases are <span class=\"customMeta\" data-dictid=\"8d0fca798b1692777191b6cd41880f\">linked</span> to <span class=\"customMeta\" data-dictid=\"bc8bc758371692777185eff2ccabb7\">coronary</span> <span class=\"customMeta\" data-dictid=\"a66cd3adaa1692777182e77cb23021\">artery</span> disease (CAD), but non-ischemic cardiomyopathies and other heart conditions also contribute.</li>\n<li>Common mechanisms leading to SCD include:</li>\n</ul>\n<ul>\n<li>Acute Myocardial Infarction</li>\n<li>Bradyarrhythmias</li>\n<li>Ventricular scars leading to arrhythmias</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 34-year-old female patient presented to the outpatient department with migratory arthritis , and examination revealed a pan-systolic murmur . An echocardiography was performed, which was suggestive of mitral regurgitation . A biopsy specimen was obtained, and the image is provided below. What is the most likely lesion shown in the histopathology slide?", "options": [{"label": "A", "text": "Aschoff’s bodies", "correct": true}, {"label": "B", "text": "Epithelioid granuloma", "correct": false}, {"label": "C", "text": "Granulomatous vasculitis", "correct": false}, {"label": "D", "text": "Granuloma inguinale", "correct": false}], "correct_answer": "A. Aschoff’s bodies", "question_images": ["https://image.prepladder.com/content/4PPOWp2kSB9p8dDhPUHq1695193149.png"], "explanation_images": ["https://image.prepladder.com/content/806yEXqsyPdvHBvnOwJH1691404661.png"], "explanation": "<p>Correct Option A - Aschoff’\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most sensitive and specific marker for myocardial infarction?", "options": [{"label": "A", "text": "Troponin I", "correct": true}, {"label": "B", "text": "Cytokeratin", "correct": false}, {"label": "C", "text": "Myoglobin", "correct": false}, {"label": "D", "text": "CK-MB", "correct": false}], "correct_answer": "A. Troponin I", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"69d29372dc169277720014447abea8\">Troponin</span> I\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An antecedent diagnosis of Group A streptococcal infection in acute rheumatic fever can be made by?", "options": [{"label": "A", "text": "ASO", "correct": true}, {"label": "B", "text": "CRP", "correct": false}, {"label": "C", "text": "Elevated ESR", "correct": false}, {"label": "D", "text": "Low C3 levels", "correct": false}], "correct_answer": "A. ASO", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - ASO\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Supporting Evidence</strong></td>\n<td style=\"text-align:center\"><strong>Test</strong></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Antigen of bacteria</td>\n<td style=\"text-align:center\">Rapid <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> test</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Antibody of bacteria</td>\n<td style=\"text-align:center\">Antistreptolysin O</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Streptococcus organism</td>\n<td style=\"text-align:center\">Throat <span class=\"customMeta\" data-dictid=\"b76c34e672169277719964ab6c1b56\">swab</span> culture</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Alcohol abuse is strongly associated with the development of which of the following condition?", "options": [{"label": "A", "text": "Pericarditis", "correct": false}, {"label": "B", "text": "Hypertrophic cardiomyopathy", "correct": false}, {"label": "C", "text": "Dilated cardiomyopathy", "correct": true}, {"label": "D", "text": "Myocarditis", "correct": false}], "correct_answer": "C. Dilated cardiomyopathy", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Dilated cardiomyopath\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 47-year-old female patient with a long-standing history of rheumatic heart disease was admitted to the hospital due to severe breathlessness . She died on the third day following admission. The mitral valve shows the following findings on autopsy. What is the cause of these findings?", "options": [{"label": "A", "text": "Rupture of valve", "correct": false}, {"label": "B", "text": "Calcification and fibrosis", "correct": true}, {"label": "C", "text": "Hypertrophy of ventricular wall", "correct": false}, {"label": "D", "text": "Hypertrophy of the atrial wall", "correct": false}], "correct_answer": "B. Calcification and fibrosis", "question_images": ["https://image.prepladder.com/content/hFPGiYY3o27fZbknjOE31698317227.png"], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"a1ee14c673169277718351bfe6afd4\">Calcification</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following myocardial infarcts causes aneurysm as a post-MI complication?", "options": [{"label": "A", "text": "Subendocardial", "correct": false}, {"label": "B", "text": "Anterior transmural", "correct": true}, {"label": "C", "text": "Posterior transmural", "correct": false}, {"label": "D", "text": "Inferior wall", "correct": false}], "correct_answer": "B. Anterior transmural", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"1ba6a9cfe11692777181950edd7a6d\">Anterior</span> transmu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A lady has a reddish, firm nodule on her chest that has not grown in size. The histopathological image is shown below. What is the diagnosis?", "options": [{"label": "A", "text": "Lipoma", "correct": false}, {"label": "B", "text": "Fibroadenoma", "correct": false}, {"label": "C", "text": "Nevus", "correct": false}, {"label": "D", "text": "Hemangioma", "correct": true}], "correct_answer": "D. Hemangioma", "question_images": ["https://image.prepladder.com/content/ohhes3wIUyfuRjC62Tj41714479502.png"], "explanation_images": [], "explanation": "<p>Correct Option D - Hemang\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following histopathological findings is not seen 12 hours after an ischemic injury to the heart?", "options": [{"label": "A", "text": "Karyorrhexis of myocytes", "correct": false}, {"label": "B", "text": "Neocapillary invasion of myocytes", "correct": false}, {"label": "C", "text": "Hyper-eosinophilia of myocytes", "correct": true}, {"label": "D", "text": "Coagulation necrosis of myocytes", "correct": false}], "correct_answer": "C. Hyper-eosinophilia of myocytes", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/kTTl3QpVM5uGgf3CWU9d1712146077.png", "https://image.prepladder.com/content/i56IuCsxDNmRNd8XpiQO1712145973.png"], "explanation": "<p>Correct Option C - Hyper-eosinoph\n<table>\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Timings of death</strong></td>\n<td style=\"text-align:center\"><strong>Gross morphology</strong></td>\n<td style=\"text-align:center\"><strong>Light <span class=\"customMeta\" data-dictid=\"51df8cdfc91692777192aa76f4de51\">microscopy</span> </strong></td>\n<td style=\"text-align:center\"><strong>Electron microscopy</strong></td>\n</tr>\n<tr>\n<td>Reversible cell injury (20 to 40 minutes)</td>\n<td style=\"text-align:center\">-</td>\n<td style=\"text-align:center\">-</td>\n<td>\n<ul>\n<li>Relaxation of myofibrils</li>\n<li>Mitochondrial swelling</li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Irreversible cell injury (30 minutes to 4 hours)</p>\n</td>\n<td style=\"text-align:center\">-</td>\n<td>\n<ul>\n<li>Vacuolation of cells</li>\n<li>Waviness of <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> fibres</li>\n</ul>\n<p><img src=\"https://image.prepladder.com/content/kTTl3QpVM5uGgf3CWU9d1712146077.png\"/></p>\n</td>\n<td>\n<ul>\n<li>Amorphous densities (calcium in mitochondria)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>4 to 12 hours</td>\n<td>Occasional dark mottling</td>\n<td>Coagulative necrosis</td>\n<td style=\"text-align:center\">-</td>\n</tr>\n<tr>\n<td>12 to 24 hours</td>\n<td>Dark mottling</td>\n<td>\n<ul>\n<li>Coagulative necrosis</li>\n<li>Neutrophils</li>\n<li>Contraction band necrosis</li>\n</ul>\n</td>\n<td> </td>\n</tr>\n<tr>\n<td>1 to 3 days</td>\n<td>-</td>\n<td>Neutrophils (acute inflammation)</td>\n<td>-</td>\n</tr>\n<tr>\n<td>3 to 7 days</td>\n<td style=\"text-align:center\">-</td>\n<td>Macrophages (chronic inflammation)</td>\n<td style=\"text-align:center\">-</td>\n</tr>\n<tr>\n<td>7 to 10 days</td>\n<td style=\"text-align:center\">-</td>\n<td>\n<p>Early <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue</p>\n<p><img src=\"https://image.prepladder.com/content/i56IuCsxDNmRNd8XpiQO1712145973.png\"/></p>\n</td>\n<td style=\"text-align:center\">-</td>\n</tr>\n<tr>\n<td>10 to 14 days</td>\n<td style=\"text-align:center\">-</td>\n<td>\n<ul>\n<li>Granulation tissue</li>\n<li>Early collagen</li>\n</ul>\n</td>\n<td style=\"text-align:center\">-</td>\n</tr>\n<tr>\n<td>2 weeks to 2 months</td>\n<td style=\"text-align:center\">-</td>\n<td>High collagen</td>\n<td style=\"text-align:center\">-</td>\n</tr>\n<tr>\n<td>>2 months</td>\n<td style=\"text-align:center\">-</td>\n<td>Scar formation</td>\n<td style=\"text-align:center\">-</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following about the endothelial contraction: Column A Column B 1. Sunburn A. Immediate sustained 2. Bee sting B. Delayed prolonged 3. Bacterial enzymes C. Endothelial cell retraction 4. Tumor necrosis factor D. Immediate transient", "options": [{"label": "A", "text": "1-B, 2-D, 3-A, 4-C", "correct": true}, {"label": "B", "text": "1-B, 2-D, 3-C, 4-A", "correct": false}, {"label": "C", "text": "1-D, 2-B, 3-A, 4-C", "correct": false}, {"label": "D", "text": "1-B, 2-A, 3-D, 4-C", "correct": false}], "correct_answer": "A. 1-B, 2-D, 3-A, 4-C", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A: 1-B, 2-D, 3-A, 4-C:</p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td>1. Sunburn</td>\n<td>B. Delayed prolonged</td>\n</tr>\n<tr>\n<td>2. Bee sting</td>\n<td>D. Immediate transient</td>\n</tr>\n<tr>\n<td>3. Bacterial enzymes</td>\n<td>A. Immediate sustained</td>\n</tr>\n<tr>\n<td>4. Tumor <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> factor</td>\n<td>C. Endothelial cell retraction</td>\n</tr>\n</tbody>\n\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td>Sunburn</td>\n<td>Delayed prolonged endothelial contraction</td>\n</tr>\n<tr>\n<td>Bee sting</td>\n<td>Immediate transient endothelial contraction</td>\n</tr>\n<tr>\n<td>Bacterial enzymes</td>\n<td>Immediate sustained endothelial contraction</td>\n</tr>\n<tr>\n<td>Tumor <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> factor</td>\n<td>Endothelial cell retraction</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following: Column A Column B 1. Boxcar nuclei A. HOCM 2. Myocyte hypertrophy B. Hypertension 3. Myocyte vacuolization C. DCMP 4. Myocyte disarray D. Subendocardial ischemia E. Hypersensitivity myocarditis", "options": [{"label": "A", "text": "1-C, 2-B, 3-A, 4-D", "correct": false}, {"label": "B", "text": "1-C, 2-B, 3-E, 4-A", "correct": false}, {"label": "C", "text": "1-E, 2-B, 3-C, 4-A", "correct": true}, {"label": "D", "text": "1-C, 2-D, 3-E, 4-A", "correct": false}], "correct_answer": "C. 1-E, 2-B, 3-C, 4-A", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - 1-E, 2-B, 3-C, 4-A:</p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td>1. Boxcar nuclei</td>\n<td>E. <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">Hypersensitivity</span> myocarditis</td>\n</tr>\n<tr>\n<td>2. <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">Myocyte</span> hypertrophy</td>\n<td>B. Hypertension</td>\n</tr>\n<tr>\n<td>3. <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">Myocyte</span> vacuolization</td>\n<td>C. DCMP</td>\n</tr>\n<tr>\n<td>4. <span class=\"customMeta\" data-dictid=\"4d740152f5169277719373f5cf60e6\">Myocyte</span> disarray</td>\n<td>A. HOCM</td>\n</tr>\n</tbody>\n\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td><strong>Boxcar nuclei</strong></td>\n<td>Hypersensitivity myocarditis</td>\n<td>Boxcar <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> are a characteristic feature of <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> myocarditis, which is an <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> condition involving the heart muscle.</td>\n</tr>\n<tr>\n<td><strong>Myocyte hypertrophy</strong></td>\n<td>Hypertension</td>\n<td>Myocyte <span class=\"customMeta\" data-dictid=\"3baac9012a1692777189cb4dc70c04\">hypertrophy</span> is a common response to chronic pressure overload, such as in hypertension, where the heart has to work harder to pump blood against increased resistance.</td>\n</tr>\n<tr>\n<td><strong>Myocyte vacuolization</strong></td>\n<td>DCMP</td>\n<td>Myocyte <span class=\"customMeta\" data-dictid=\"b4b21965ef16927772016a6e5bc91c\">vacuolization</span> is often seen in dilated <span class=\"customMeta\" data-dictid=\"6e6dd7aed216927771831ebdf9703c\">cardiomyopathy</span> (DCMP), a condition where the heart chambers become enlarged and weakened.</td>\n</tr>\n<tr>\n<td><strong>Myocyte disarray</strong></td>\n<td>HOCM</td>\n<td>Myocyte disarray is a prominent feature of hypertrophic obstructive <span class=\"customMeta\" data-dictid=\"6e6dd7aed216927771831ebdf9703c\">cardiomyopathy</span> (HOCM), a genetic condition characterized by thickening of the heart muscle, especially the <span class=\"customMeta\" data-dictid=\"769fa5be3616927771906f8ae8b053\">interventricular</span> septum.</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 39 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following statements about rheumatic heart disease (RHD) is incorrect?", "options": [{"label": "A", "text": "An abnormal immune response to Group A Streptococcus infection causes RHD.", "correct": false}, {"label": "B", "text": "RHD commonly affects the pulmonary valve, resulting in valvular stenosis or regurgitation.", "correct": true}, {"label": "C", "text": "Chronic inflammation and scarring of heart valves.", "correct": false}, {"label": "D", "text": "Prevented with timely treatment of streptococcal infections with antibiotics.", "correct": false}], "correct_answer": "B. RHD commonly affects the pulmonary valve, resulting in valvular stenosis or regurgitation.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old child presents to the clinic with complaints of shortness of breath and fatigue. Upon examination, a diastolic murmur along the left sternal border is detected. An echocardiogram reveals mitral valve stenosis and regurgitation, consistent with Rheumatic heart disease (RHD). What is the most common predisposing condition for this patient to develop RHD?", "options": [{"label": "A", "text": "Streptococcal pharyngitis", "correct": true}, {"label": "B", "text": "Streptococcal skin infections", "correct": false}, {"label": "C", "text": "Streptococcal glomerulonephritis", "correct": false}, {"label": "D", "text": "All the above", "correct": false}], "correct_answer": "A. Streptococcal pharyngitis", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Rheumatic heart disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Post Streptococcal glomerulonephritis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs post-streptococcal <span class=\"customMeta\" data-dictid=\"32a1e3c77516927771956ec2bbac4c\">pharyngitis</span> more commonly than Impetigo</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs post-streptococcal <span class=\"customMeta\" data-dictid=\"32a1e3c77516927771956ec2bbac4c\">pharyngitis</span> or Impetigo</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Type II <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> reaction</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Type III <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> reaction</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Penicillin <span class=\"customMeta\" data-dictid=\"bc36e9b9381692777196b5f9a2f79c\">prophylaxis</span> is required post <span class=\"customMeta\" data-dictid=\"48093996911692777182dcce1e92b7\">ARF</span> to prevent the development of RHD.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antibiotics</strong> to treat the streptococcal infection; <strong>no prophylaxis</strong> needed after initial infection.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/VLNqMXkJTlSR525TIyIF1747303454.mp3", "video": ""}, {"text": "A 7-year-old child presented to the clinic with fever, joint pain, and rash with a history of sore throat about three weeks ago, which resolved without treatment. Examination reveals a rash characterized by pink to red lesions with well-defined borders and tender, swollen joints. What is the primary mechanism underlying the development of acute rheumatic fever (ARF) in this patient following the untreated sore throat?", "options": [{"label": "A", "text": "Direct invasion of tissues by streptococcal bacteria", "correct": false}, {"label": "B", "text": "Delayed hypersensitivity reaction to streptococcal exotoxins", "correct": false}, {"label": "C", "text": "Cross-reactivity between streptococcal antigens and host proteins", "correct": true}, {"label": "D", "text": "Activation of complement by streptococcal toxins", "correct": false}], "correct_answer": "C. Cross-reactivity between streptococcal antigens and host proteins", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Structural components of GABHS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Human tissue it cross reacts with</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Capsular hyaluronic acid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Synovial fluid</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cell wall proteins</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myocardium</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cell wall carbohydrates</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cardiac valves</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytoplasmic <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> antigens</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vascular intima</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peptidoglycans</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Skin antigens</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old male presented with severe dyspnea and a history of recurrent sore throat in childhood. An echocardiogram reveals thickened, immobile, prolapsed mitral valve leaflets. An endomyocardial biopsy reveals characteristic histopathological findings, as shown in the image. Which of the following is not a characteristic histopathological finding in this patient?", "options": [{"label": "A", "text": "Presence of Anitschkow cells", "correct": false}, {"label": "B", "text": "Infiltration of lymphocytes, plasma cells, and macrophages", "correct": false}, {"label": "C", "text": "Presence of fibrinoid necrosis", "correct": false}, {"label": "D", "text": "Presence of granulation tissue", "correct": true}], "correct_answer": "D. Presence of granulation tissue", "question_images": ["https://image.prepladder.com/content/WBVCq0w2S0M4SPLDVbgy1737609238.png"], "explanation_images": ["https://image.prepladder.com/content/AN0XwzJ4kivPn7Hn2FXk1737650382.png", "https://image.prepladder.com/content/VUM8eYDVtFLBuK2WFFFb1737609405.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a major criterion in the Jones criteria for diagnosing acute rheumatic fever (ARF)?", "options": [{"label": "A", "text": "Polyarthralgia involving two or more joints", "correct": false}, {"label": "B", "text": "Fever (≥38.5°C)", "correct": false}, {"label": "C", "text": "Elevated acute phase reactants", "correct": false}, {"label": "D", "text": "Subcutaneous nodules over bony prominences", "correct": true}], "correct_answer": "D. Subcutaneous nodules over bony prominences", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/t4oU8jWzjHbaGpsrYfmG1737609491.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Major criteria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Minor criteria</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Clinical or <span class=\"customMeta\" data-dictid=\"4e02cdf6641692777199b3cc3b7237\">subclinical</span> evidence of <span class=\"customMeta\" data-dictid=\"7b028d193416927771835d48b193f9\">carditis</span> (e.g., new murmur)</li>\n<li>Migratory <span class=\"customMeta\" data-dictid=\"943744d33e1692777196a18ed1b73c\">polyarthritis</span> (Two or more joints involved)</li>\n<li>Sydenham <span class=\"customMeta\" data-dictid=\"46ce506e9d1692777184f7a4a276ad\">chorea</span> (involuntary movements)</li>\n<li>Erythema marginatum (characteristic skin rash)</li>\n<li>Subcutaneous nodules<strong> </strong><strong>(Option D)</strong></li>\n</ul>\n</td>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Previous rheumatic fever or rheumatic heart disease</li>\n<li>Fever (≥38.5°C) <strong>(Option B)</strong></li>\n<li>Poly or mono <span class=\"customMeta\" data-dictid=\"7fbf2bac0e1692777182ab459be337\">arthralgia</span> <strong>(Option A)</strong></li>\n<li>Elevated <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> phase reactants (e.g., CRP, ESR) <strong>(Option C)</strong></li>\n<li>Prolonged PR interval on ECG</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 54-year-old man with a history of mitral valve prolapse presents to the clinic with fever and malaise following a recent dental procedure. On examination, a new regurgitant murmur is auscultated. Blood cultures are obtained, and subsequent testing reveals the presence of gram-positive cocci in chains. Which of the following organisms is most likely responsible for the new onset murmur in this patient?", "options": [{"label": "A", "text": "Staphylococcus aureus", "correct": false}, {"label": "B", "text": "Streptococcus viridans", "correct": true}, {"label": "C", "text": "Staphylococcus epidermidis", "correct": false}, {"label": "D", "text": "Enterococci", "correct": false}], "correct_answer": "B. Streptococcus viridans", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements best describes the nature of vegetation in infective endocarditis (IE)?", "options": [{"label": "A", "text": "Smooth and non-destructive lesions", "correct": false}, {"label": "B", "text": "Typically contain only fibrin and inflammatory cells", "correct": false}, {"label": "C", "text": "Prone to embolisation", "correct": true}, {"label": "D", "text": "Most commonly found on the tricuspid valve", "correct": false}], "correct_answer": "C. Prone to embolisation", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/sneIPUORpxfyXmOPqYMg1737609695.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old man with a history of intravenous drug use presents with fever, chills, and fatigue for the past week. On examination, the patient has multiple lesions on the palms and soles as shown below. The patient also has a new heart murmur. Blood cultures are positive for Staphylococcus aureus. What are these lesions shown below?", "options": [{"label": "A", "text": "Splinter hemorrhages", "correct": false}, {"label": "B", "text": "Osler nodes", "correct": false}, {"label": "C", "text": "Janeway lesions", "correct": true}, {"label": "D", "text": "Roth spots", "correct": false}], "correct_answer": "C. Janeway lesions", "question_images": ["https://image.prepladder.com/content/SGSl8wc3bf0O7rkbSXML1737609755.png"], "explanation_images": ["https://image.prepladder.com/content/nMUmBCVG8OUTvlY0K2qe1737609763.png", "https://image.prepladder.com/content/LdS0yUXbZiWIcENPqi051737609789.png", "https://image.prepladder.com/content/E7Bi9CU3HAVOxlhhzVwx1737609807.png", "https://image.prepladder.com/content/4p9no64z4MgT38V5BvGF1737609904.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Major criteria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Minor Criteria</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Blood culture: </strong>\n<ul>\n<li>2 cultures positive, 12 hours apart or</li>\n<li>Single positive for Coxiella</li>\n</ul>\n</li>\n<li><strong>ECHO: </strong>showing endocardial involvement.</li>\n</ul>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Fever > 38°C</strong></li>\n<li><strong>Vascular phenomenon:</strong> like Janeway lesions</li>\n<li><strong>Immunological phenomenon:</strong> like Osler’s nodes, Roth nodes, Glomerulonephritis</li>\n<li><strong>Microbiological criteria: </strong>involvement of other <span class=\"customMeta\" data-dictid=\"aa279cf1f016927771903f195bb1b9\">infectious</span> organisms</li>\n<li><strong>Predisposition to IE </strong>(previous history of IE or IV drug abuse)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/GgUqTeWEuR9IiLK1eB7q1746451434.mp3", "video": ""}, {"text": "Which of the following is not a predisposing factor for Nonbacterial Thrombotic Endocarditis (NBTE)?", "options": [{"label": "A", "text": "Advanced malignancy", "correct": false}, {"label": "B", "text": "Antiphospholipid antibody syndrome", "correct": false}, {"label": "C", "text": "Systemic lupus erythematosus", "correct": false}, {"label": "D", "text": "Traumatic injury to the heart valves", "correct": true}], "correct_answer": "D. Traumatic injury to the heart valves", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following pathologies with the correct pattern of vegetative endocarditis caused by them: 1. Rheumatic Heart Disease a) Small, warty, sterile vegetations along the line of closure of valve leaflets 2. Infective Endocarditis b) Small, bland, sterile vegetation along the line of closure 3.Non-bacterial thrombotic endocarditis (NBTE) c) Small or medium-sized sterile vegetations on both sides of valvular leaflets. 4. Libman-Sacks endocarditis d) Large, bulky, infected, friable, irregular mass along the line of closure or on valvular cusps.", "options": [{"label": "A", "text": "1-a, 2-d, 3-c, 4-b", "correct": false}, {"label": "B", "text": "1-a, 2-d, 3-b, 4-c", "correct": true}, {"label": "C", "text": "1-b, 2-d, 3-c, 4-a", "correct": false}, {"label": "D", "text": "1-d, 2-c, 3-b, 4-a", "correct": false}], "correct_answer": "B. 1-a, 2-d, 3-b, 4-c", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/UtSwK4WW0Oni6QSAuM5R1737610059.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:379px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Vegetations and site</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rheumatic heart disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small, warty, <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> vegetations along the line of <span class=\"customMeta\" data-dictid=\"2b4569285f1692777184282b1ca3f1\">closure</span> of <span class=\"customMeta\" data-dictid=\"416dd1004a169277720177d9a6adc5\">valve</span> leaflets.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Infective Endocarditis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Large, bulky, infected, friable, <span class=\"customMeta\" data-dictid=\"863f5457381692777190f05632a8b2\">irregular</span> mass along the line of <span class=\"customMeta\" data-dictid=\"2b4569285f1692777184282b1ca3f1\">closure</span> or on valvular cusps, more on the atrial side.</li>\n<li>They cause damage to cordae tendinae and <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> muscles.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-bacterial Thrombotic Endocarditis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small, bland, <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> <span class=\"customMeta\" data-dictid=\"a55b16a09b169277720184a41c82c4\">vegetation</span> along the line of closure.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Libman-Sacks <span class=\"customMeta\" data-dictid=\"33812b7bb0169277718707b5473b45\">Endocarditis</span> </strong></p>\n<p><strong>(Endocarditis of SLE)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small or medium-sized <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> vegetations on either or both sides of valvular leaflets, most commonly on the lower side.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 60-year-old male with a chronic history of diabetes, hypertension and hypercholesterolemia came to the clinic for follow-up. His BP has not been under control for many years. He has a vascular lesion similar to the image shown below. What does this image indicate?", "options": [{"label": "A", "text": "Atheromatous plaques", "correct": false}, {"label": "B", "text": "Thick arterial wall due to deposition of pink, hyaline material", "correct": false}, {"label": "C", "text": "Onion-skin appearance", "correct": true}, {"label": "D", "text": "Lipid deposition within the vessel wall", "correct": false}], "correct_answer": "C. Onion-skin appearance", "question_images": ["https://image.prepladder.com/content/UUk1VoRpGVAl6gMN4DHl1736860689.png"], "explanation_images": ["https://image.prepladder.com/content/iHC6BlFBTFpi3uWE25FJ1736860750.png", "https://image.prepladder.com/content/aIQ94hB8qChZaPenqkJI1736860794.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents with high pulse pressure. Histopathological examination is shown below. The arteries appear thickened, but there is no significant luminal narrowing. Which of the following conditions is the likely cause?", "options": [{"label": "A", "text": "Atherosclerosis", "correct": false}, {"label": "B", "text": "Monckeberg medial calcific sclerosis", "correct": true}, {"label": "C", "text": "Hyperplastic arteriosclerosis", "correct": false}, {"label": "D", "text": "Hyaline arteriosclerosis", "correct": false}], "correct_answer": "B. Monckeberg medial calcific sclerosis", "question_images": ["https://image.prepladder.com/content/nTFcaVOPagskd7NJ6FST1736861024.png"], "explanation_images": ["https://image.prepladder.com/content/9Id2QQ07s9rPtRwzBNrd1738905485.png", "https://image.prepladder.com/content/IX1tweQSuATcwFrwjO901736861134.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Arrange the following steps of atherosclerosis formation in the correct order. Endothelial injury and dysfunction Accumulation of lipoproteins Platelet adhesion and factor release Smooth muscle and collagen formation", "options": [{"label": "A", "text": "1&gt;2&gt;3&gt;4", "correct": true}, {"label": "B", "text": "1&gt;2&gt;4&gt;3", "correct": false}, {"label": "C", "text": "2&gt;3&gt;4&gt;1", "correct": false}, {"label": "D", "text": "1&gt;3&gt;2&gt;4", "correct": false}], "correct_answer": "A. 1>2>3>4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/eBiaEWYi9NRUXmYiqTMu1736861331.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents with sudden-onset severe abdominal pain radiating to his back. On physical examination, a pulsatile mass is palpated in his abdomen. He has a history of hypertension, hyperlipidemia, and smoking. Based on the clinical presentation and risk factors, which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Takayasu's arteritis", "correct": false}, {"label": "B", "text": "Diverticulitis", "correct": false}, {"label": "C", "text": "Abdominal aortic aneurysm", "correct": true}, {"label": "D", "text": "Pancreatitis", "correct": false}], "correct_answer": "C. Abdominal aortic aneurysm", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following types of aortic dissections. a. 1. Stanford Type A b. 2. Debakey type I c. 3. Debakey II 4. Debakey III", "options": [{"label": "A", "text": "A-2, B-4, C-1", "correct": false}, {"label": "B", "text": "A-3, B-1, C-4", "correct": false}, {"label": "C", "text": "A-2, B-1, C-4", "correct": true}, {"label": "D", "text": "A-4, B-3, C-1", "correct": false}], "correct_answer": "C. A-2, B-1, C-4", "question_images": ["https://image.prepladder.com/content/ZXxRJbLsLTqLKTk3oEHw1737649206.png", "https://image.prepladder.com/content/Oofx53fXw0aESCedUqmw1737649232.png", "https://image.prepladder.com/content/DcHck11zSmILcxSyd41I1737649245.png"], "explanation_images": ["https://image.prepladder.com/content/rMzz8GUTye54y7KmHJai1736861839.png", "https://image.prepladder.com/content/KGhG9wPFxXBOlZLjcbBO1736861886.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:519px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extent</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type I</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ascending aorta</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extends into <span class=\"customMeta\" data-dictid=\"9a89dd67841692777182ee412af263\">arch</span> and <span class=\"customMeta\" data-dictid=\"0cf8ac70611692777186b133d027f6\">descending</span> aorta</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type II</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ascending aorta</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Confined to <span class=\"customMeta\" data-dictid=\"62f0d7c8491692777182ab7cc82edb\">ascending</span> aorta</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type III</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Descending aorta</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Starts <span class=\"customMeta\" data-dictid=\"5ff25303a01692777186731f6a4f5c\">distal</span> to left <span class=\"customMeta\" data-dictid=\"9562c879be1692777199afcb12fa54\">subclavian</span> artery</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IIIa</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Limited to <span class=\"customMeta\" data-dictid=\"3c6021096816927772007954fcc158\">thoracic</span> aorta</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IIIb</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extends below diaphragm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:602px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Management Implication</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involves the <strong>ascending aorta</strong> (± arch, <span class=\"customMeta\" data-dictid=\"0cf8ac70611692777186b133d027f6\">descending</span> aorta)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Surgical emergency</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type B</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involves <strong>only the <span class=\"customMeta\" data-dictid=\"0cf8ac70611692777186b133d027f6\">descending</span> aorta</strong>, <strong>distal to the left <span class=\"customMeta\" data-dictid=\"9562c879be1692777199afcb12fa54\">subclavian</span> artery</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Medical management</strong> unless complications arise</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/8dB5jj0V9qkozUC4UxF91748892281.mp3", "video": ""}, {"text": "Which of the following is an intermediate-grade vascular tumour?", "options": [{"label": "A", "text": "Kaposi sarcoma", "correct": true}, {"label": "B", "text": "Angiosarcoma", "correct": false}, {"label": "C", "text": "Hemangiopericytoma", "correct": false}, {"label": "D", "text": "Pyogenic granuloma", "correct": false}], "correct_answer": "A. Kaposi sarcoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/jDGEQJFs9ZnC3VpOjHop1736861975.png"], "explanation": "\n<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Type </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Conditions </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Benign Neoplasms, Developmental and <span class=\"customMeta\" data-dictid=\"0f0b2969921692777180de24f0b0c0\">Acquired</span> Conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hemangioma\n\t\t\t\t<ul>\n<li>Capillary hemangioma</li>\n<li>Cavernous hemangioma</li>\n<li>Pyogenic granuloma</li>\n</ul>\n</li>\n<li>Lymphangioma\n\t\t\t\t<ul>\n<li>Simple (capillary) lymphangioma</li>\n<li>Cavernous <span class=\"customMeta\" data-dictid=\"6ae8d691861692777191c5157ba7b8\">lymphangioma</span> (cystic hygroma)</li>\n</ul>\n</li>\n<li>Glomus tumor</li>\n<li>Vascular ectasias\n\t\t\t\t<ul>\n<li>Nevus flammeus</li>\n<li>Spider <span class=\"customMeta\" data-dictid=\"623d2000ca16927772004e68005b8a\">telangiectasia</span> (arterial spider)</li>\n<li>Hereditary hemorrhagic <span class=\"customMeta\" data-dictid=\"ac3f7ff7c81692777200b22a0accdf\">telangiectasis</span> (Osler-Weber-Rendu disease)</li>\n</ul>\n</li>\n<li>Reactive <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> proliferations\n\t\t\t\t<ul>\n<li>Bacillary angiomatosis</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Intermediate-Grade Neoplasms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Kaposi sarcoma</li>\n<li>Hemangioendothelioma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Malignant Neoplasms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Angiosarcoma</li>\n<li>Hemangiopericytoma</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-month-old infant is brought to the clinic with a rapidly expanding, clearly defined, bright red lesion on the face. Upon examination, the lesion feels soft, yields to pressure, and temporarily loses color when pressure is applied. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Pyogenic granuloma", "correct": false}, {"label": "B", "text": "Infantile hemangioma", "correct": true}, {"label": "C", "text": "Nevus flammeus", "correct": false}, {"label": "D", "text": "Venous malformation", "correct": false}], "correct_answer": "B. Infantile hemangioma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Z6RVFaBT23AE6Jgwdu3h1736862151.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old patient presents with a history of multiple tumours in various organs, including the brain, retina, and kidneys. On examination, retinal angiomas and cerebellar hemangioblastomas are noted. The patient's family history reveals similar manifestations in relatives. Which of the following lesions is commonly associated with this syndrome?", "options": [{"label": "A", "text": "Glioblastoma multiforme", "correct": false}, {"label": "B", "text": "Adenomatous polyps", "correct": false}, {"label": "C", "text": "Capillary hemangioma", "correct": false}, {"label": "D", "text": "Cavernous hemangioma", "correct": true}], "correct_answer": "D. Cavernous hemangioma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/72XezKhGLC6zHvYKR29B1736862331.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old individual complains of a throbbing mass on the tip of their index finger. Upon examination, the lesion is bluish and extremely tender to the touch. Which of the following is the most probable diagnosis?", "options": [{"label": "A", "text": "Ganglion cyst", "correct": false}, {"label": "B", "text": "Bacillary angiomatosis", "correct": false}, {"label": "C", "text": "Glomus tumour", "correct": true}, {"label": "D", "text": "Cavernous lymphangioma", "correct": false}], "correct_answer": "C. Glomus tumour", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/6LJpGAsHsUxsBtZXn7mL1736862419.png", "https://image.prepladder.com/content/cWnoupD3RPELsgvv4S9N1736862440.png", "https://image.prepladder.com/content/F0savRSAoOw5Qxw07UhX1736862465.png", "https://image.prepladder.com/content/5P7pggKzkfnEigZrg1Hk1736862475.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old HIV-positive patient presents with multiple reddish-purple nodules on the lower extremities. On examination, the lesions are non-tender, non-pruritic, and do not blanch with pressure. There is also evidence of mucosal involvement in the oral cavity. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Hemangiopericytoma", "correct": false}, {"label": "B", "text": "Hemangioendothelioma", "correct": false}, {"label": "C", "text": "Kaposi sarcoma", "correct": true}, {"label": "D", "text": "Angiosarcoma", "correct": false}], "correct_answer": "C. Kaposi sarcoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2f9C5WDxIhYm4afRGAs81736862785.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old woman, 20 weeks pregnant, presents with a painful, growing, reddish lump on her gums (as shown below) that bleeds when brushing or eating. The lesion is tender, and she denies any history of trauma or irritation. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Hemangiopericytoma", "correct": false}, {"label": "B", "text": "Kasabach-Merritt Syndrome", "correct": false}, {"label": "C", "text": "Angiosarcoma", "correct": false}, {"label": "D", "text": "Lobular Capillary Hemangioma", "correct": true}], "correct_answer": "D. Lobular Capillary Hemangioma", "question_images": ["https://image.prepladder.com/content/YF1TI6GkkiMAMhvCjyqH1737649523.png"], "explanation_images": ["https://image.prepladder.com/content/T8Vy483W2AsBvH8Er1DL1737649577.png", "https://image.prepladder.com/content/QkyVcZ7SOqUmPpqJMDCK1737649614.png", "https://image.prepladder.com/content/i7OdpcAv6x0x0AZyac351737649752.png", "https://image.prepladder.com/content/b8CJBCk4ft6dCf29SFqm1737649655.png", "https://image.prepladder.com/content/tDJqHWJntZ1H8DwFiB9H1737649717.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 21 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Weibel-Palade bodies consist of which of the following components?", "options": [{"label": "A", "text": "Collagen", "correct": false}, {"label": "B", "text": "von Willebrand factor (vWF)", "correct": true}, {"label": "C", "text": "Platelet-derived growth factor (PDGF)", "correct": false}, {"label": "D", "text": "Tumor necrosis factor (TNF)", "correct": false}], "correct_answer": "B. von Willebrand factor (vWF)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:436px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Contents</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Vascular functions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Von Willebrand factor</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p>Thrombosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor VIIIa</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>t-PA</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrinolysis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>P-selectin</strong></p>\n</td>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p>Inflammation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-8</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Eotaxin</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>α-1,3-fucosyltransferase VI</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD63 (Lamp 3)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">Exocytosis</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endothelin 1</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p>Vasoconstriction</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endothelin converting enzyme</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Calcitonin gene-related peptide</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vasodilation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Angiopoietin 2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Angiogenesis</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 68-year-old woman presents to the emergency department with a three-week history of progressively worsening temporal headaches, jaw pain, and visual disturbances. On examination, her right temporal artery appears swollen and tender to palpation. Which of the following statements regarding this condition are false?", "options": [{"label": "A", "text": "Involves large to medium-sized arteries", "correct": false}, {"label": "B", "text": "It is the most common cause of vasculitis in adults", "correct": false}, {"label": "C", "text": "It occurs as a result of a B cell-mediated immune response", "correct": true}, {"label": "D", "text": "It is associated with polymyalgia rheumatica", "correct": false}], "correct_answer": "C. It occurs as a result of a B cell-mediated immune response", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:722px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Epidemiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common type of <span class=\"customMeta\" data-dictid=\"fcb3e0d7911692777201ffb9695dea\">vasculitis</span> in <strong>adults</strong> (usually >50 years old) <strong>(Option B)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathophysiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>T cell-mediated immune response</strong> against vessel wall antigens.</li>\n<li>Contributions from pro-inflammatory cytokines (particularly <strong>TNF</strong>) and <strong>anti-Endothelial Cell antibodies</strong> can be seen.</li>\n<li>An association with <strong>MHC class II haplotypes</strong> can be seen.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Fever.</li>\n<li>Anaemia (normocytic normochromic).</li>\n<li>High ESR.</li>\n<li><strong>Headaches </strong>(most common).</li>\n<li><strong>Jaw claudication</strong> (most specific symptom).</li>\n<li>Sudden <span class=\"customMeta\" data-dictid=\"cf284485b71692777183c57876bed2\">blindness</span> (due to involvement of <span class=\"customMeta\" data-dictid=\"c09776e61f1692777194db295c590f\">ophthalmic</span> artery).</li>\n<li>Associated with <strong>polymyalgia rheumatica. (Option D)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Arteries affected</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Temporal <span class=\"customMeta\" data-dictid=\"a66cd3adaa1692777182e77cb23021\">artery</span> (most commonly involved).</li>\n<li>Vertebral artery.</li>\n<li>Ophthalmic artery.</li>\n<li>Aorta (giant cell aortitis).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>High dose corticosteroid</li>\n<li>Steroid sparing agents\n\t\t\t\t<ul>\n<li>Tocilizumab</li>\n<li>Methotrexate</li>\n</ul>\n</li>\n<li>Aspirin may also be used</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Kykae1owrqI8K6eKre4P1745346646.mp3", "video": ""}, {"text": "An arterial biopsy of an elderly male was performed and is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Giant cell arteritis", "correct": true}, {"label": "B", "text": "Takayasu arteritis", "correct": false}, {"label": "C", "text": "Polyarteritis nodosa", "correct": false}, {"label": "D", "text": "Microscopic polyangiitis", "correct": false}], "correct_answer": "A. Giant cell arteritis", "question_images": ["https://image.prepladder.com/content/YzfMY6wx7fDa9CCQYM1M1736869073.png"], "explanation_images": ["https://image.prepladder.com/content/oJVTQuKYIi87MYhHnL2n1736869154.png", "https://image.prepladder.com/content/PCRhOno9tNykwAhCwFxv1737574742.png", "https://image.prepladder.com/content/4pfgqD1AnFgSOnkbHIVp1736869207.png", "https://image.prepladder.com/content/5i0GcnOnaJfwpCwqqT9e1736869249.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Takayasu <span class=\"customMeta\" data-dictid=\"08d90ca11716927771828423b87d47\">arteritis</span> (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Histologically, the changes range from <strong>adventitial <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">mononuclear</span> infiltrates</strong> with <strong>perivascular <span class=\"customMeta\" data-dictid=\"498207d794169277718550e3cd125e\">cuffing</span> of the <span class=\"customMeta\" data-dictid=\"06595275c11692777201aee0394042\">vasa</span> vasorum</strong> to <strong>intense</strong> <strong>mononuclear inflammation</strong> in the media.</li>\n<li>Granulomatous inflammation, replete with giant cells and <strong>patchy medial</strong> <strong>necrosis</strong>, is also seen.</li>\n<li>As the disease progresses, <span class=\"customMeta\" data-dictid=\"79dbeeeba41692777184e63d6d214e\">collagenous</span> scarring, with admixed chronic <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> infiltrates, occurs in all three vessel wall layers.</li>\n</ul>\n<p><img alt=\"\" data-author=\"Dale Davis, Nicole K. Andeen\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.pathologyoutlines.com/topic/kidneynontumortakayasuarteritis.html\" data-tags=\"\" height=\"467\" src=\"https://image.prepladder.com/content/PCRhOno9tNykwAhCwFxv1737574742.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Polyarteritis nodosa (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>During the <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> phase, <strong>transmural inflammation</strong> of the arterial wall with a mixed <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> of neutrophils, eosinophils, and <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">mononuclear</span> cells occurs, frequently accompanied by <strong>fibrinoid necrosis</strong> and <strong>luminal</strong> <strong>thrombosis.</strong></li>\n<li>Older lesions show <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> thickening of the vessel wall extending into the adventitia.</li>\n<li>Characteristically, <strong>all stages of activity</strong> (from early to late) <strong>coexist in</strong> <strong>different vessels or even within the same vessel</strong>, suggesting ongoing injury.</li>\n<li>Associated with <strong>Hepatitis B </strong>and rarely <span class=\"customMeta\" data-dictid=\"39867f177b16927771888cf43850d5\">Hepatitis</span> C.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"dr n. med. Krystyna Bielnik, lek. med. Dariusz Młoczkowski, dr n. med. Tadeusz Modrzewski, lek. med. Dorota Snopkowska, prof. dr hab. med. Krzysztof W. Zieliński\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Periarteritis_nodosa_renis.jpg\" data-tags=\"\" height=\"848\" src=\"https://image.prepladder.com/content/4pfgqD1AnFgSOnkbHIVp1736869207.png\" width=\"1071\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microscopic <span class=\"customMeta\" data-dictid=\"9a6ce977bc1692777196a292871244\">polyangiitis</span> (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It is characterised by <strong>segmental <span class=\"customMeta\" data-dictid=\"43b1f01822169277720222a3b354dd\">fibrinoid</span> necrosis</strong> of the media with <strong>focal <span class=\"customMeta\" data-dictid=\"53ab411c811692777200e0e1b68984\">transmural</span> necrotising lesions</strong>; <span class=\"customMeta\" data-dictid=\"9e1f97f6ad169277718805c2dd35c1\">granulomatous</span> <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> is absent.</li>\n<li>These lesions <strong>morphologically resemble PAN</strong> but typically spare medium-sized and larger arteries; consequently, <span class=\"customMeta\" data-dictid=\"f446058fd81692777191e035c08229\">macroscopic</span> infarcts are uncommon.</li>\n<li>In some areas (typically <span class=\"customMeta\" data-dictid=\"1693275ac916927771963c7c630abf\">postcapillary</span> venules), only infiltrating and fragmenting neutrophils are seen, giving rise to the term <strong>leukocytoclastic vasculitis.</strong></li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Jenny Giang, Marc A. J. Seelen, Martijn B. A. van Doorn, Robert Rissmann,Errol P. Prens and Jeffrey Damman\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Micrograph_of_cutaneous_small-vessel_vasculitis.jpg\" data-tags=\"\" height=\"2462\" src=\"https://image.prepladder.com/content/5i0GcnOnaJfwpCwqqT9e1736869249.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old female presents to the outpatient department with complaints of fatigue, weight loss, and intermittent claudication in her upper limbs. On further questioning, she reports occasional headaches and dizziness. Physical examination reveals absent pulses in both brachial arteries and decreased blood pressure in the upper extremities compared to the lower extremities. Laboratory investigations show elevated ESR &amp; CRP, and Doppler ultrasound shows diffuse narrowing and irregularities in the brachial and subclavian arteries. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Rheumatoid arthritis", "correct": false}, {"label": "B", "text": "Takayasu arteritis", "correct": true}, {"label": "C", "text": "Polyarteritis nodosa", "correct": false}, {"label": "D", "text": "Microscopic polyangiitis", "correct": false}], "correct_answer": "B. Takayasu arteritis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 52-year-old woman presents with a 3-month history of muscle aches, joint pain, and numbness in her hands and feet and blood in stools. She also reports experiencing episodes of abdominal pain and nausea. Physical examination reveals decreased sensation in the distal extremities and decreased peripheral pulses. Laboratory tests show elevated erythrocyte sedimentation rate (ESR) and C-reactive protein (CRP). Nerve conduction studies indicate peripheral neuropathy. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Polyarteritis nodosa (PAN)", "correct": true}, {"label": "B", "text": "Wegener's granulomatosis", "correct": false}, {"label": "C", "text": "Churg-Strauss syndrome", "correct": false}, {"label": "D", "text": "Giant cell arteritis", "correct": false}], "correct_answer": "A. Polyarteritis nodosa (PAN)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/mKv5wnFqpoIMWn5PEccB1736869422.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:657px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Polyarteritis nodosa</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PAN is a <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"fcb3e0d7911692777201ffb9695dea\">vasculitis</span> of <strong>small- or medium-sized</strong> <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> arteries that typically affects <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> and visceral vessels but <strong>spares the lungs (pulmonary circulation).</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Etiology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Idiopathic</strong></p>\n<p>One-third of patients with PAN have <strong>chronic <span class=\"customMeta\" data-dictid=\"39867f177b16927771888cf43850d5\">hepatitis</span> B</strong>, which leads to the formation of HBsAg-HbsAb complexes that deposit in affected vessels.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pathology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Segmental <span class=\"customMeta\" data-dictid=\"53ab411c811692777200e0e1b68984\">transmural</span> necrotising inflammation</strong></p>\n<ul>\n<li>Acute phase: <span class=\"customMeta\" data-dictid=\"53ab411c811692777200e0e1b68984\">Transmural</span> <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> with mixed infiltrates of neutrophils, eosinophils, and <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">mononuclear</span> cells.</li>\n<li>Frequently accompanied by <span class=\"customMeta\" data-dictid=\"43b1f01822169277720222a3b354dd\">fibrinoid</span> <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and <span class=\"customMeta\" data-dictid=\"fbb10919e516927771917a9afcb633\">luminal</span> thrombosis.</li>\n<li>Chronic phase: <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">Fibrosis</span> and <span class=\"customMeta\" data-dictid=\"e9dcc3d4241692777198c7030bf313\">scarring</span> of the arterial wall.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"dr n. med. Krystyna Bielnik, lek. med. Dariusz Młoczkowski, dr n. med. Tadeusz Modrzewski, lek. med. Dorota Snopkowska, prof. dr hab. med. Krzysztof W. Zieliński\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Periarteritis_nodosa_renis.jpg\" data-tags=\"\" height=\"848\" src=\"https://image.prepladder.com/content/mKv5wnFqpoIMWn5PEccB1736869422.png\" width=\"1071\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Presentation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Renal Involvement</strong>:\n\t\t\t\t<ul>\n<li>Rapidly accelerating <span class=\"customMeta\" data-dictid=\"45372f6c361692777189ff3209e642\">hypertension</span> due to <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> <span class=\"customMeta\" data-dictid=\"a66cd3adaa1692777182e77cb23021\">artery</span> involvement.</li>\n<li>Renal <span class=\"customMeta\" data-dictid=\"0f670d10711692777190af4b12fac9\">ischemia</span> or <span class=\"customMeta\" data-dictid=\"77aed446d2169277719007f42bf052\">infarction</span> may occur.</li>\n</ul>\n</li>\n<li><strong>Gastrointestinal Manifestations</strong>:\n\t\t\t\t<ul>\n<li>Abdominal pain, nausea, vomiting, and bloody stools due to mesenteric ischemia.</li>\n</ul>\n</li>\n<li><strong>Neurologic Symptoms</strong>:\n\t\t\t\t<ul>\n<li>Peripheral <span class=\"customMeta\" data-dictid=\"6e951a16031692777193af1c351309\">neuritis</span> (commonly motor nerves), <span class=\"customMeta\" data-dictid=\"7a2b1d82c81692777192003fcdc1b3\">mononeuritis</span> multiplex.</li>\n</ul>\n</li>\n<li><strong>Musculoskeletal</strong>:\n\t\t\t\t<ul>\n<li>Diffuse myalgias and arthralgias.</li>\n</ul>\n</li>\n<li><strong>Vascular Complications</strong>:\n\t\t\t\t<ul>\n<li>Aneurysms, thrombosis, and vessel rupture.</li>\n</ul>\n</li>\n<li><strong>Other Organ Involvement</strong>:\n\t\t\t\t<ul>\n<li>Kidneys, heart, liver, and <span class=\"customMeta\" data-dictid=\"b3a647ce2516927771881427f56c1d\">gastrointestinal</span> <span class=\"customMeta\" data-dictid=\"1a1307223f16927772017a994bfc39\">tract</span> are most commonly affected (in <span class=\"customMeta\" data-dictid=\"0cf8ac70611692777186b133d027f6\">descending</span> order).</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Elevated <span class=\"customMeta\" data-dictid=\"49069760291692777187e0e72db819\">ESR</span> and CRP.</li>\n<li>Hepatitis B <span class=\"customMeta\" data-dictid=\"6cffb1ffdd1692777198f0c11de8fe\">serology</span> positive in associated cases.</li>\n<li>Renal function <span class=\"customMeta\" data-dictid=\"4885d5d0021692777189aac6dc80f7\">impairment</span> in severe cases.</li>\n<li>Angiography shows aneurysms and stenoses in medium-sized vessels (“string-of-beads” appearance).</li>\n<li>Biopsy: <span class=\"customMeta\" data-dictid=\"32b854324a1692777185c6c79fdc99\">Definitive</span> diagnosis is made by <span class=\"customMeta\" data-dictid=\"754ab07a2e1692777183ed178c883d\">biopsy</span> of affected tissues, showing <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">segmental</span> <span class=\"customMeta\" data-dictid=\"53ab411c811692777200e0e1b68984\">transmural</span> <span class=\"customMeta\" data-dictid=\"f826a1a46e1692777193319fa1e5ed\">necrotizing</span> inflammation.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Treatment</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Corticositeorid</li>\n<li>Cyclophoshamide in <span class=\"customMeta\" data-dictid=\"3790c638ab16927771970a0a41d3ab\">refractory</span> cases</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 3-year-old child presents with a high fever persisting for five days, along with bilateral conjunctival injection, strawberry tongue, and rash on the trunk and extremities. There is also swelling and erythema of the hands and feet. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Measles", "correct": false}, {"label": "B", "text": "Scarlet fever", "correct": false}, {"label": "C", "text": "Henoch-Schönlein purpura", "correct": false}, {"label": "D", "text": "Kawasaki disease", "correct": true}], "correct_answer": "D. Kawasaki disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/layl2TaBzxwZrZngNrVG1736869614.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 42-year-old male heavy smoker presents with a history of recurrent episodes of pain and discolouration in his fingers and toes, particularly when exposed to cold temperatures. On examination, you notice superficial migratory thrombophlebitis in his lower extremities. Doppler ultrasound reveals segmental occlusions in the arteries of his lower limbs. Considering his clinical presentation, which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Thromboangiitis Obliterans", "correct": true}, {"label": "B", "text": "Raynaud's Phenomenon", "correct": false}, {"label": "C", "text": "Atherosclerosis", "correct": false}, {"label": "D", "text": "Giant Cell Arteritis", "correct": false}], "correct_answer": "A. Thromboangiitis Obliterans", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:738px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Thromboangiitis obliterans (Buerger’s disease)</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is characterized by segmental, thrombosing, <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> and <span class=\"customMeta\" data-dictid=\"e025d338b21692777184b4a309cbfb\">chronic inflammation</span> of <strong>medium and small-sized arteries</strong>, especially the <span class=\"customMeta\" data-dictid=\"f2a519f38316927772004fe7c606af\">tibial</span> and <span class=\"customMeta\" data-dictid=\"4fff084ff9169277719765c9d85a8e\">radial</span> arteries, that often leads to <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> insufficiency, typically of the extremities.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Etiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs almost exclusively in heavy <strong>cigarette smokers</strong>, usually before the age of 35</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Affected vessels of <span class=\"customMeta\" data-dictid=\"2e753064f01692777200d559337698\">thromboangiitis</span> obliterans show <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> and chronic inflammation, accompanied by <span class=\"customMeta\" data-dictid=\"fbb10919e516927771917a9afcb633\">luminal</span> thrombosis.</li>\n<li>The <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> process extends into <span class=\"customMeta\" data-dictid=\"2a2420d6bc1692777185ac0cb7e93d\">contiguous</span> veins and nerves (rare with other forms of vasculitis), and with time, all three structures can be encased in <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> tissue</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Recurrent episodes of pain and discolouration in the extremities</strong>, particularly with exposure to cold, along with <strong>superficial</strong> <strong>migratory thrombophlebitis.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Imaging</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Doppler <span class=\"customMeta\" data-dictid=\"df077f2c3d16927772019f8223e58f\">ultrasound</span> findings may reveal <strong>segmental occlusions</strong> in the affected arteries, supporting the diagnosis.</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a characteristic feature of Buerger disease?", "options": [{"label": "A", "text": "Segmental fibrinoid necrosis of the media with focal transmural necrotising lesions", "correct": false}, {"label": "B", "text": "Segmental thrombosing vasculitis affecting small and medium-sized arteries", "correct": true}, {"label": "C", "text": "Granulomatous inflammation of vessel walls", "correct": false}, {"label": "D", "text": "Adventitial mononuclear infiltrates with perivascular cuffing of the vasa vasorum", "correct": false}], "correct_answer": "B. Segmental thrombosing vasculitis affecting small and medium-sized arteries", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/l81XvaZZSWUT7skDwDgJ1736869853.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old child presents with palpable purpura on the lower extremities, arthralgia, and abdominal pain. Laboratory tests show elevated serum IgA levels and red blood cell casts in urine. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Henoch-Schönlein Purpura", "correct": true}, {"label": "B", "text": "Systemic Lupus Erythematosus", "correct": false}, {"label": "C", "text": "Kawasaki Disease", "correct": false}, {"label": "D", "text": "Rheumatic Fever", "correct": false}], "correct_answer": "A. Henoch-Schönlein Purpura", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:745px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Henoch-Schönlein <span class=\"customMeta\" data-dictid=\"0acd34c758169277719644923511e5\">Purpura</span> (IgA vasculitis)</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is a <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"fcb3e0d7911692777201ffb9695dea\">vasculitis</span> characterised by <strong>inflammation of small blood vessels</strong>, primarily affecting <strong>children,</strong> but can also occur in adults.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Etiology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Often follows upper <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> <span class=\"customMeta\" data-dictid=\"1a1307223f16927772017a994bfc39\">tract</span> infections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immune complex deposition of <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> in small blood vessels leads to inflammation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Inflammation of small blood vessels</strong>, primarily affecting <strong>children,</strong> but can also occur in adults.</li>\n<li>Associated with <strong>elevated <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> levels</strong></li>\n<li><strong>Skin</strong>: <span class=\"customMeta\" data-dictid=\"bd478e4ff816927771949528846af9\">Palpable</span> purpura, most prominently on the lower limbs and buttocks.</li>\n<li><strong>Musculoskeletal</strong>: <span class=\"customMeta\" data-dictid=\"7fbf2bac0e1692777182ab459be337\">Arthralgia</span> or arthritis, often <span class=\"customMeta\" data-dictid=\"a6cf2c3dc51692777200ef7fb22f69\">transient</span> and non-deforming.</li>\n<li><strong>Gastrointestinal</strong>: <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">Abdominal</span> pain, nausea, vomiting, and sometimes <span class=\"customMeta\" data-dictid=\"b3a647ce2516927771881427f56c1d\">gastrointestinal</span> bleeding, <span class=\"customMeta\" data-dictid=\"ecba80da7b1692777190a1ae56e0a7\">Intussusception</span> is a severe but rare complication.</li>\n<li><strong>Renal</strong>: Hematuria, proteinuria, and <span class=\"customMeta\" data-dictid=\"248111ded81692777197946454db52\">red blood cell</span> casts in urine.</li>\n<li>Can progress to <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> <span class=\"customMeta\" data-dictid=\"b06dd1c5181692777193f14f3ed7d7\">nephropathy</span> in severe cases.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Management </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Supportive care</strong>: Hydration, rest, and pain management with NSAIDs for arthralgia.</li>\n<li><strong>Glucocorticoids</strong>: For severe <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> pain, <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> involvement, or <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> symptoms.</li>\n<li><strong>Intussusception</strong>: <span class=\"customMeta\" data-dictid=\"81d12f9cb01692777199e44ff3f3c1\">Surgical</span> intervention if required.</li>\n<li><strong>Nephritis</strong>: Immunosuppressants (e.g., cyclophosphamide) in severe cases.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/bVYdFLHVpLLqc2prYqWU1747669377.mp3", "video": ""}, {"text": "A 55-year-old female presents with hematuria, hemoptysis, and sinusitis. Renal biopsy reveals pauci-immune necrotising crescentic glomerulonephritis. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Wegener's Granulomatosis", "correct": true}, {"label": "B", "text": "Goodpasture Syndrome", "correct": false}, {"label": "C", "text": "Systemic Lupus Erythematosus (SLE)", "correct": false}, {"label": "D", "text": "Microscopic Polyangiitis (MPA)", "correct": false}], "correct_answer": "A. Wegener's Granulomatosis", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>ANCA pattern</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Diseases</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>c-ANCA</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Granulomatosis with polyangitis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>p-ANCA</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Microscopic polyangitis</li>\n<li>Churg Strauss syndrome</li>\n<li>Ulcerative colitis</li>\n<li>Primary <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> cholangitis</li>\n<li>Goodpasture syndrome</li>\n<li>Pauci-immune glomerulonephritis</li>\n<li>Rheumatoid arthritis</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presents with rapidly progressive hematuria, hemoptysis, and peripheral neuropathy. Serological testing reveals the presence of perinuclear anti-neutrophil cytoplasmic antibodies (p-ANCA) targeting myeloperoxidase (MPO). What is the most likely diagnosis based on these serological findings?", "options": [{"label": "A", "text": "Microscopic Polyangiitis", "correct": true}, {"label": "B", "text": "Granulomatosis with Polyangiitis", "correct": false}, {"label": "C", "text": "Eosinophilic Granulomatosis with Polyangiitis", "correct": false}, {"label": "D", "text": "Goodpasture Syndrome", "correct": false}], "correct_answer": "A. Microscopic Polyangiitis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old male patient presents with recurrent oral ulcers, genital ulcers, and skin lesions on the lower extremities. He also complains of blurred vision and pain in his right eye. On examination, there are multiple oral and genital ulcers with posterior uveitis evident on ophthalmologic evaluation. Which of the following is false regarding the condition?", "options": [{"label": "A", "text": "HLA B27 positivity", "correct": true}, {"label": "B", "text": "Painful scarring oral ulcers", "correct": false}, {"label": "C", "text": "Erythema nodosum", "correct": false}, {"label": "D", "text": "Positive pathergy test", "correct": false}], "correct_answer": "A. HLA B27 positivity", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:708px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Behcet’s disease</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Rare, chronic, and <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> small-to-medium vessel <span class=\"customMeta\" data-dictid=\"fcb3e0d7911692777201ffb9695dea\">vasculitis</span> characterized by <span class=\"customMeta\" data-dictid=\"041f0e547a1692777193350b3f7d39\">neutrophilic</span> inflammation.</li>\n<li>It primarily affects the blood vessels but can involve multiple organ systems, including the skin, eyes, joints, and nervous system.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>HLA-B51</strong></li>\n<li>ASCA (Anti-Saccharomyces cerevisiae antibodies)</li>\n<li>Anti-Selenium Binding Protein</li>\n<li>Anti-Endothelium Antibodies:</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>A clinical <span class=\"customMeta\" data-dictid=\"1a0a43d74e16927772004473a05ae3\">triad</span> of <strong>recurrent oral <span class=\"customMeta\" data-dictid=\"c267cc6e5716927771818c84304bbe\">aphthous</span> ulcers + <span class=\"customMeta\" data-dictid=\"0e919a208b16927771885d9c1f6662\">genital</span> ulcers + uveitis</strong> is seen</li>\n<li><strong>Oral</strong> <strong>Aphthous</strong> <strong>Ulcers</strong>: hallmark feature <strong>(Option </strong><strong>B)</strong></li>\n<li><strong>Genital</strong> <strong>Ulcers</strong>: Painful and may leave scars after healing.</li>\n<li><strong>Uveitis</strong>: most serious manifestations due to its potential for causing blindness.</li>\n<li>Other Symptoms: Joint pain (<strong>arthritis</strong>), skin lesions (<strong>erythema nodosum</strong>) <strong>(Option C)</strong>, <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> manifestations (<strong>thrombophlebitis, deep <span class=\"customMeta\" data-dictid=\"75ddd4cc7016927772012e0acd424d\">vein</span> thrombosis</strong>), and neurological involvement</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathergy test (Option D):</strong></p>\n<ul>\n<li>Non-specific <span class=\"customMeta\" data-dictid=\"05d473885c1692777189fe284131d7\">hyperreactivity</span> of the skin to trauma.</li>\n<li>Typically, a <span class=\"customMeta\" data-dictid=\"b3008e4783169277719411dbdb635e\">papule</span> or <span class=\"customMeta\" data-dictid=\"0fd6c2af6d169277719639d2c79d03\">pustule</span> (>2 mm) forms in 24–48 hours after a needle prick.</li>\n<li>It is unique for Behcet disease, hence considered as a part of <span class=\"customMeta\" data-dictid=\"552e9ef8811692777186997018b858\">diagnostic</span> criteria.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Management</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Corticosteroids</strong>: Used to reduce <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> inflammation.</li>\n<li><strong>Immunosuppressants</strong>: <span class=\"customMeta\" data-dictid=\"80fd8ffd0816927771826bfe7129d6\">azathioprine</span> and <span class=\"customMeta\" data-dictid=\"a6ed2a5f63169277718507c569e576\">cyclophosphamide</span> may be used in severe cases to manage <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> involvement.</li>\n<li>TNF inhibitors such as <strong>infliximab</strong> or <strong>adalimumab</strong> may be considered for <span class=\"customMeta\" data-dictid=\"3790c638ab16927771970a0a41d3ab\">refractory</span> cases or those with severe uveitis.</li>\n<li>Pain management and local treatments for ulcers, <span class=\"customMeta\" data-dictid=\"fe2c08a01b1692777187011e915049\">eye drops</span> for uveitis, and non-steroidal anti-inflammatory drugs (NSAIDs) for joint pain.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old girl with a history of asthma presents with wheezing and rhinitis. Lab reports show eosinophilia and antibodies against neutrophil myeloperoxidase. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Churg-Strauss syndrome", "correct": true}, {"label": "B", "text": "PAN", "correct": false}, {"label": "C", "text": "Buerger's disease", "correct": false}, {"label": "D", "text": "Wegener granulomatosis", "correct": false}], "correct_answer": "A. Churg-Strauss syndrome", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Churg Strauss syndrome</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Churg-Strauss syndrome (also called <strong>allergic <span class=\"customMeta\" data-dictid=\"2db4616dd0169277718891a2a1b67c\">granulomatosis</span> and angiitis</strong>) is a <strong>small-vessel <span class=\"customMeta\" data-dictid=\"f826a1a46e1692777193319fa1e5ed\">necrotizing</span> vasculitis</strong> classically associated with <strong>asthma</strong>, <strong>allergic</strong> <strong>rhinitis</strong>, <strong>lung infiltrates, <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> eosinophilia, <span class=\"customMeta\" data-dictid=\"26e1dbfb921692777187208a4ff0e9\">extravascular</span> <span class=\"customMeta\" data-dictid=\"f826a1a46e1692777193319fa1e5ed\">necrotizing</span> granulomas</strong>, and <strong>eosinophilic <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of vessels and tissues.</strong></p>\n\t\t\t \n\n\t\t\t<ul>\n<li>New name: <strong>Eosinophilic <span class=\"customMeta\" data-dictid=\"2db4616dd0169277718891a2a1b67c\">granulomatosis</span> with polyangiitis.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vessels affected</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small to medium sized arteries</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinical feature</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Asthma, allergic rhinitis, <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> neuropathy, <span class=\"customMeta\" data-dictid=\"fcb3e0d7911692777201ffb9695dea\">vasculitis</span> and <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> granulomas</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>p-ANCA/MPO antibodies +ve, Eosinophilia, <span class=\"customMeta\" data-dictid=\"754ab07a2e1692777183ed178c883d\">Biopsy</span> shows <span class=\"customMeta\" data-dictid=\"9e1f97f6ad169277718805c2dd35c1\">granulomatous</span> inflammation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Management</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cortoicosteroids</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 23 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is true about coagulative necrosis?", "options": [{"label": "A", "text": "It is the least common type of necrosis", "correct": false}, {"label": "B", "text": "Brain is most likely to undergo coagulative necrosis", "correct": false}, {"label": "C", "text": "It causes a wedge-shaped necrosis in the affected organs", "correct": true}, {"label": "D", "text": "The tissue architecture is lost", "correct": false}], "correct_answer": "C. It causes a wedge-shaped necrosis in the affected organs", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/zDqvIwi1hu0iSUW2grvi1737444211.png", "https://image.prepladder.com/content/DI8XPXCT5tahSXel6Prs1737444281.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/zve7mJd9Wtq1y4kPNfTB1739701444.mp3", "video": ""}, {"text": "A 65 year male presents with weakness on the right half of his body. He is a known case of atrial fibrillation, not on any treatment. CT angiography shows a complete occlusion of a small branch of the middle cerebral artery. What is the most likely change seen in this pathology?", "options": [{"label": "A", "text": "Coagulative necrosis", "correct": false}, {"label": "B", "text": "Liquefactive necrosis", "correct": true}, {"label": "C", "text": "Apoptosis", "correct": false}, {"label": "D", "text": "Fibrinoid necrosis", "correct": false}], "correct_answer": "B. Liquefactive necrosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/fa5uLYDyHnoRrGLLraF61737444361.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:600px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Type of Necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Organ involved</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Coagulative necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ischaemia in Heart, Liver, <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">Kidney</span> and dry gangrene.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Liquefactive necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hypoxic death of cells in CNS, Wet gangrene, Abscess.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Caseous necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TB infection,Fungal infections(Histoplasmosis,Coccidioidomycosis) ,Syphilis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrinoid necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immune reaction involving blood vessels</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fat necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute pancreatitis, Breast</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Q6fkPVMojcAFZgtOtdvC1739702350.mp3", "video": ""}, {"text": "A 45-year-old man presents to the clinic with a persistent cough, weight loss, and night sweats. A chest X-ray shows cavitary lesions in the upper lobes of the lungs. Sputum analysis is positive for acid-fast bacilli. A biopsy is taken, and a cut section of the lung is shown below.What type of necrosis is most likely present in this patient's lung tissue?", "options": [{"label": "A", "text": "Coagulative necrosis", "correct": false}, {"label": "B", "text": "Caseous necrosis", "correct": true}, {"label": "C", "text": "Fatty necrosis", "correct": false}, {"label": "D", "text": "Liquefactive necrosis", "correct": false}], "correct_answer": "B. Caseous necrosis", "question_images": ["https://image.prepladder.com/content/qBNjjHjNovFeOsr2pQrQ1737444430.png"], "explanation_images": ["https://image.prepladder.com/content/QHv2pDKaAFKJhYueFRub1737444484.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/CchTeTWp4tnFovUy1YZj1739702745.mp3", "video": ""}, {"text": "Which of the following conditions does not involve fibrinoid necrosis?", "options": [{"label": "A", "text": "Systemic Lupus Erythematosus.", "correct": false}, {"label": "B", "text": "Malignant hypertension", "correct": false}, {"label": "C", "text": "Atherosclerosis", "correct": true}, {"label": "D", "text": "Polyarteritis Nodosa (PAN)", "correct": false}], "correct_answer": "C. Atherosclerosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tSbirlyPBOBP2rqaxhlA1737444638.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/wmfESpeqc6qwRunAg8yg1739702934.mp3", "video": ""}, {"text": "Based on the provided image, which features are indicative of the type of gangrene depicted?", "options": [{"label": "A", "text": "Presence of gas bubbles in the affected tissue", "correct": false}, {"label": "B", "text": "Formation of bullae filled with fluid", "correct": false}, {"label": "C", "text": "Dry, shrunken, and mummified appearance with a clear demarcation", "correct": true}, {"label": "D", "text": "Presence of foul-smelling discharge and crepitus on palpation", "correct": false}], "correct_answer": "C. Dry, shrunken, and mummified appearance with a clear demarcation", "question_images": ["https://image.prepladder.com/content/KmXWKTE3BGCwTyyMPud01737444718.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:600px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Dry gangrene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Wet gangrene</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Site </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Commonly<strong> limbs </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More common in the <strong>bowel</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mechanism</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Arterial</strong> occlusion</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More commonly, <strong>venous</strong> obstruction</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Coagulative necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Liquefactive necrosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macroscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Organ dry, shrunken, and black</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Part is moist, soft, swollen, rotten, and dark</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Line of demarcation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present - at the <span class=\"customMeta\" data-dictid=\"9f0942c0b51692777190ee876713e5\">junction</span> between healthy and gangrenous part</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No clear-cut line of demarcation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Infection </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No infection </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Infection present, with <span class=\"customMeta\" data-dictid=\"e4626b4cea16927771968e59732fef\">pus</span> formation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Generally <strong>better</strong> due to little septicemia.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Generally <strong>poor</strong> due to profound toxaemia.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/me4XPzndarDyQxCtxAYY1739704791.mp3", "video": ""}, {"text": "Identify the correctly matched pair among the following", "options": [{"label": "A", "text": "Coagulative necrosis- Leucocytic enzymes- Brain", "correct": false}, {"label": "B", "text": "Liquefactive necrosis- Lysosomal enzymes - Heart", "correct": false}, {"label": "C", "text": "Fat necrosis- Pancreatic lipase- Omentum", "correct": true}, {"label": "D", "text": "Fibrinoid necrosis- Bacterial enzymes- Leg", "correct": false}], "correct_answer": "C. Fat necrosis- Pancreatic lipase- Omentum", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:601px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Type of necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Pathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Coagulative </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lysosomal enzymes derived from</p>\n<p>infiltrating leukocytes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ischemia in all organs except the brain</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Liquefactive</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microbes stimulating <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> enzymes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bacterial and fungal infections</p>\n<p>Ischemia in brain</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Caseous</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Formation of <span class=\"customMeta\" data-dictid=\"2334b7498b1692777188fa8b2eee36\">granuloma</span> by lymphocytes and activated macrophages (giant cells, <span class=\"customMeta\" data-dictid=\"ed5f81953d1692777187529a6de318\">epithelioid</span> cells).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tuberculosis,Fungal infections( Histoplasmosis, Coccidioidomycosis) ,Syphilis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gangrenous</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ischemia and necrosis </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lower and upper limb</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fat necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pancreatic enzymes leak out of</p>\n<p>damaged <span class=\"customMeta\" data-dictid=\"ddae3800d31692777180746a2d0590\">acinar</span> cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pancreatitis, <span class=\"customMeta\" data-dictid=\"18034e0517169277720002aaa66d36\">traumatic</span> <span class=\"customMeta\" data-dictid=\"98d3c7538116927772025a8d29c563\">fat necrosis</span> of the breast. </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrinoid </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immune reactions involving blood vessels</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Polyarteritis nodosa, SLE, Arthus reaction, rheumatic heart disease, <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> hypertension, etc. </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/UQOqEotklv3d0h8kFwta1739705018.mp3", "video": ""}, {"text": "Which of the following statements about apoptosis is false?", "options": [{"label": "A", "text": "Characterized by the activation of caspases leading to DNA fragmentation.", "correct": false}, {"label": "B", "text": "Inflammatory response and release of damage-associated molecular patterns (DAMPs).", "correct": true}, {"label": "C", "text": "Chromatin condensation and formation of cytoplasmic blebs.", "correct": false}, {"label": "D", "text": "Eliminates cells that are injured beyond repair without eliciting a host reaction.", "correct": false}], "correct_answer": "B. Inflammatory response and release of damage-associated molecular patterns (DAMPs).", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Fsaw4gDHMpUAAP9vuALu1737445031.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/t94tL0JjlHJfKEbz6QNj1739705218.mp3", "video": ""}, {"text": "Match the following apoptotic genes with their functions: 1. BCL2 , MCL1 a. Allows cytochrome c leakage 2. BAX, BAK b. Initiates apoptosis when upregulated 3. BAD, BID, NOXA c. Prevents leakage of cytochrome C from the cytosol", "options": [{"label": "A", "text": "1-b , 2-c , 3-a", "correct": false}, {"label": "B", "text": "1-c , 2-a , 3-b", "correct": true}, {"label": "C", "text": "1-a , 2-b , 3-c", "correct": false}, {"label": "D", "text": "1-b , 2-a , 3-c", "correct": false}], "correct_answer": "B. 1-c , 2-a , 3-b", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/sqPUOEpdHzwHB26vz1O21739721087.mp3", "video": ""}, {"text": "Arrange the steps of the extrinsic pathway of apoptosis in the correct order. i. Binding of Fas ligand of T cells to Fas ii. Trimerization of Fas iii. Activation of caspase 8, 10. iv. Formation of FADD", "options": [{"label": "A", "text": "i&gt;ii&gt;iii&gt;iv", "correct": false}, {"label": "B", "text": "iii&gt;i&gt;ii&gt;iv", "correct": false}, {"label": "C", "text": "i&gt;ii&gt;iv&gt;iii", "correct": true}, {"label": "D", "text": "iv&gt;i&gt;ii&gt;iii", "correct": false}], "correct_answer": "C. i>ii>iv>iii", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/4WEO9XxVEjdtJlw1kFcB1736768474.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/VHV1AOEbjuIxKHADj70M1739721299.mp3", "video": ""}, {"text": "Which of the following forms the apoptosome complex?", "options": [{"label": "A", "text": "SMAC, DIABLO", "correct": false}, {"label": "B", "text": "Cyt C and Apaf", "correct": true}, {"label": "C", "text": "Procaspase 9 and Caspase 9", "correct": false}, {"label": "D", "text": "Caspase 3, 6, 7", "correct": false}], "correct_answer": "B. Cyt C and Apaf", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/GI5zVnqvF6I6cBYJSBEk1737445590.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/rQ8cAlZrt5rO9ujG3bua1739721627.mp3", "video": ""}, {"text": "Which of the following substances is not a component of ‘eat-me signals’ of efferocytosis?", "options": [{"label": "A", "text": "C1q", "correct": false}, {"label": "B", "text": "Thrombospondin", "correct": false}, {"label": "C", "text": "Phosphatidyl serine", "correct": false}, {"label": "D", "text": "Fas Ligand", "correct": true}], "correct_answer": "D. Fas Ligand", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/tysMmL8YVVNczSwPALll1739724098.mp3", "video": ""}, {"text": "Which of the following cell deaths is most likely to show pattern B?", "options": [{"label": "A", "text": "Apoptosis", "correct": true}, {"label": "B", "text": "Necrosis", "correct": false}, {"label": "C", "text": "Both", "correct": false}, {"label": "D", "text": "None of the above", "correct": false}], "correct_answer": "A. Apoptosis", "question_images": ["https://image.prepladder.com/content/Q4E76xnwotmwyFvcrJpq1749166651.png"], "explanation_images": ["https://image.prepladder.com/content/sRIxsA1heCm2OO0kpHy81749166427.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Apoptosis </strong><strong>(Option A)</strong><strong> </strong><strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Necrosis </strong><strong>(Options B & C ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DNA Cleavage</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Internucleosomal, specific</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Random and nonspecific</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Enzyme Involved</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Activated endonucleases</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-specific <span class=\"customMeta\" data-dictid=\"d395f610461692777185cbe8b8806d\">degradation</span> by <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> enzymes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Electrophoresis Result</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ladder pattern (discrete bands)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Smear pattern (continuous degradation)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fragment Size</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Multiples of ~180–200 base pairs</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Heterogeneous, <span class=\"customMeta\" data-dictid=\"6ed1fae61016927772011384d62c60\">unorganized</span> fragments</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Interpretation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Indicates controlled cell death</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Indicates uncontrolled cell death</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following are involved in the pathogenesis of pyroptosis?", "options": [{"label": "A", "text": "Caspase 8 and FADD", "correct": false}, {"label": "B", "text": "RIPK3 and MLKL", "correct": false}, {"label": "C", "text": "Caspase 1 and inflammasome", "correct": true}, {"label": "D", "text": "Iron and glutathione antioxidants", "correct": false}], "correct_answer": "C. Caspase 1 and inflammasome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Mt976V4Tb4W9t0KKileG1739724283.mp3", "video": ""}, {"text": "Which of the following is true about programmed necrosis?", "options": [{"label": "A", "text": "Caspase-independent programmed cell death.", "correct": true}, {"label": "B", "text": "It is non-inflammatory.", "correct": false}, {"label": "C", "text": "It is only pathological.", "correct": false}, {"label": "D", "text": "It helps kill the Herpes simplex virus.", "correct": false}], "correct_answer": "A. Caspase-independent programmed cell death.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/G8gmRKV4HDweyVkgIjJY1739724397.mp3", "video": ""}, {"text": "Which type of cell death prevents metastasis?", "options": [{"label": "A", "text": "Necroptosis", "correct": false}, {"label": "B", "text": "Pyroptosis", "correct": false}, {"label": "C", "text": "Anoikis", "correct": true}, {"label": "D", "text": "Necrosis", "correct": false}], "correct_answer": "C. Anoikis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/EPGLb0gbCyv9q7rht7Kj1749019714.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 25 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "What is the most common cause of cell injury?", "options": [{"label": "A", "text": "Hypoxia", "correct": true}, {"label": "B", "text": "Immunologic reactions", "correct": false}, {"label": "C", "text": "Drug-induced", "correct": false}, {"label": "D", "text": "Nutritional imbalance", "correct": false}], "correct_answer": "A. Hypoxia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/h92gM4F8pPi2dVVhVlrx1739534984.mp3", "video": ""}, {"text": "Identify the correct combination of most and least sensitive cells to hypoxia.", "options": [{"label": "A", "text": "Most sensitive - hepatocytes and least sensitive - Lymphocytes", "correct": false}, {"label": "B", "text": "Most sensitive - bone marrow cells and least sensitive - nerve cells", "correct": false}, {"label": "C", "text": "Most sensitive - retina and least sensitive - adipose tissue", "correct": false}, {"label": "D", "text": "Most sensitive - neurons and least sensitive - fibroblasts", "correct": true}], "correct_answer": "D. Most sensitive - neurons and least sensitive - fibroblasts", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/CrlxmhcKeGgRN3Hmq7rh1739535318.mp3", "video": ""}, {"text": "Which among the following is not a feature of reversible cell injury?", "options": [{"label": "A", "text": "Large amorphous densities in the mitochondria", "correct": true}, {"label": "B", "text": "Decrease in ATP generation", "correct": false}, {"label": "C", "text": "Swelling of the endoplasmic reticulum", "correct": false}, {"label": "D", "text": "Detachment of ribosomes from granular ER", "correct": false}], "correct_answer": "A. Large amorphous densities in the mitochondria", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/gGutGRYyloyAZV9Tnym41739537378.mp3", "video": ""}, {"text": "Match the following descriptions of the nuclear changes in irreversible cell injury. I. Pyknosis a. Nuclear fragmentation II. Karyorrhexis b. Dissolution of nucleus III. Karyolysis c. Shrinking of the nucleus and clumping of nuclear chromatin", "options": [{"label": "A", "text": "I-a, II-b, III-c", "correct": false}, {"label": "B", "text": "I-b, II-c, III-a", "correct": false}, {"label": "C", "text": "I-c, II-a, III-b", "correct": true}, {"label": "D", "text": "I-c, II-b, III-a", "correct": false}], "correct_answer": "C. I-c, II-a, III-b", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/7cIM71b3esNfh80A3I521737441052.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:546px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pyknosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Shrinking of the <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> and <span class=\"customMeta\" data-dictid=\"7cc5d500951692777184bdd73ef72d\">clumping</span> of nuclear chromatin</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Karyorrhexis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nuclear fragmentation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Karyolysis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dissolution of nucleus</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/KbwJAGjqkSENvl6Xqmf61739537815.mp3", "video": ""}, {"text": "Which of the following is the most important electron microscopic finding in irreversible cell injury?", "options": [{"label": "A", "text": "Small amorphous densities in the mitochondria", "correct": false}, {"label": "B", "text": "Swelling of the endoplasmic reticulum", "correct": false}, {"label": "C", "text": "Large amorphous densities in the mitochondria", "correct": true}, {"label": "D", "text": "Detachment of ribosomes from the granular endoplasmic reticulum", "correct": false}], "correct_answer": "C. Large amorphous densities in the mitochondria", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/9HHohriZE4Qg261j63fP1739695462.mp3", "video": ""}, {"text": "Which of the following statements regarding free radical injury is true?", "options": [{"label": "A", "text": "Free radicals are highly stable molecules with unpaired electrons that contribute positively to cellular functions.", "correct": false}, {"label": "B", "text": "Free radical injury can lead to cell damage through lipid peroxidation, protein oxidation, and DNA strand breaks.", "correct": true}, {"label": "C", "text": "Antioxidants play a minor role in protecting cells from free radical damage.", "correct": false}, {"label": "D", "text": "Free radicals primarily cause cell death through apoptosis and do not contribute to necrosis.", "correct": false}], "correct_answer": "B. Free radical injury can lead to cell damage through lipid peroxidation, protein oxidation, and DNA strand breaks.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/jwdjHoe63TrXcpfudoWX1739695815.mp3", "video": ""}, {"text": "A sample of tissue preparation is subjected to oxidative stress under experimental conditions. Different types of free radicals are generated in the process. However, the researcher wants to work on the most potent and reactive free radicals among the ones generated. Which of the following will he be working on?", "options": [{"label": "A", "text": "Hydroxyl radical (OH•)", "correct": true}, {"label": "B", "text": "Nitric oxide radical (NO•)", "correct": false}, {"label": "C", "text": "Superoxide anion radical (O2•-)", "correct": false}, {"label": "D", "text": "Peroxyl radical (ROO•)", "correct": false}], "correct_answer": "A. Hydroxyl radical (OH•)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:623px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Non-Enzymatic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Enzymatic</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vitamin E, A, and C.</li>\n</ul>\n<p>(Vitamin A is not an <span class=\"customMeta\" data-dictid=\"1f3c08447d16927771819ccd566468\">antioxidant</span> in the <span class=\"customMeta\" data-dictid=\"0f0067663b16927771818fe253b3b9\">aqueous</span> humor of eye.</p>\n<ul>\n<li>Se, Mn, Zn.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Superoxide dismutase.</li>\n<li>Catalase.</li>\n<li>Glutathione peroxidase.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/93Mo5zvEW12YiFDOF2NT1739697073.mp3", "video": ""}, {"text": "Which of the following is a telltale sign of free radical injury in cells?", "options": [{"label": "A", "text": "Increased antioxidant levels in the cell", "correct": false}, {"label": "B", "text": "Decreased lipid peroxidation products", "correct": false}, {"label": "C", "text": "Generation of Lipofuscin and stress markers such as malondialdehyde (MDA)", "correct": true}, {"label": "D", "text": "Enhanced cellular energy production.", "correct": false}], "correct_answer": "C. Generation of Lipofuscin and stress markers such as malondialdehyde (MDA)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/0YaSHGVsqf6lwkeRosAT1739698067.mp3", "video": ""}, {"text": "What is the primary function of superoxide dismutase (SOD) in cells?", "options": [{"label": "A", "text": "Activation of inflammatory responses.", "correct": false}, {"label": "B", "text": "Generation of reactive oxygen species (ROS)", "correct": false}, {"label": "C", "text": "Neutralization of superoxide anion radicals (O2•-) into hydrogen peroxide (H2O2)", "correct": true}, {"label": "D", "text": "Promotion of lipid peroxidation.", "correct": false}], "correct_answer": "C. Neutralization of superoxide anion radicals (O2•-) into hydrogen peroxide (H2O2)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:623px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Non-Enzymatic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Enzymatic</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vitamin E, A, and C.</li>\n</ul>\n<p>(Vitamin A is not an <span class=\"customMeta\" data-dictid=\"1f3c08447d16927771819ccd566468\">antioxidant</span> in the <span class=\"customMeta\" data-dictid=\"0f0067663b16927771818fe253b3b9\">aqueous</span> humor of eye.</p>\n<ul>\n<li>Se, Mn, Zn.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Superoxide dismutase.</li>\n<li>Catalase.</li>\n<li>Glutathione peroxidase.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/adw8q0bmoSmUoSn7jd3y1739698452.mp3", "video": ""}, {"text": "A 50-year-old male presents with progressive weakness and muscle atrophy, primarily affecting his arms and legs. He reports difficulty with tasks such as buttoning shirts and lifting objects. On examination, you note fasciculations in his upper extremities and decreased muscle strength. His reflexes are brisk, and there is no sensory deficit. Nerve conduction studies show signs of denervation. Genetic testing reveals a mutation in the SOD1 gene. Based on this clinical scenario, what is the most likely diagnosis for this patient?", "options": [{"label": "A", "text": "Multiple sclerosis", "correct": false}, {"label": "B", "text": "Myasthenia gravis", "correct": false}, {"label": "C", "text": "Amyotrophic lateral sclerosis", "correct": true}, {"label": "D", "text": "Guillain-Barré syndrome", "correct": false}], "correct_answer": "C. Amyotrophic lateral sclerosis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/lxcFWPVoU2cjmsF14hZt1739698745.mp3", "video": ""}, {"text": "Which of the following best describes the primary function of chaperones within the cellular environment?", "options": [{"label": "A", "text": "Facilitating the degradation of misfolded proteins", "correct": false}, {"label": "B", "text": "Promoting protein folding and preventing misfolding", "correct": true}, {"label": "C", "text": "Catalyzing enzymatic reactions by providing a scaffold", "correct": false}, {"label": "D", "text": "Transporting proteins across cellular membranes", "correct": false}], "correct_answer": "B. Promoting protein folding and preventing misfolding", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:679px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Misfolded protein</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Creutzfeldt-Jacob disease</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cystic fibrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cystic <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> <span class=\"customMeta\" data-dictid=\"f0c8d0b3871692777200426e503319\">transmembrane</span> conductance regulator (CFTR)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/8IC0mv82e8ODLqQWCYCG1739699858.mp3", "video": ""}, {"text": "Which of the following pathways are responsible for the pathogenesis of ALS?", "options": [{"label": "A", "text": "Autophagy-lysosome pathway", "correct": false}, {"label": "B", "text": "Ubiquitin-proteasome pathway", "correct": true}, {"label": "C", "text": "Endocytic pathway", "correct": false}, {"label": "D", "text": "Apoptotic pathway", "correct": false}], "correct_answer": "B. Ubiquitin-proteasome pathway", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/F8pSpaCARIRGOR4F7OIK1739701050.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following statements best describes the role of telomerase in cellular ageing?", "options": [{"label": "A", "text": "Telomerase accelerates ageing by reducing the length of telomeres with each cell division", "correct": false}, {"label": "B", "text": "Telomerase maintains the constant telomere length in somatic cells throughout their lifespan.", "correct": false}, {"label": "C", "text": "Telomerase prevents the shortening of telomeres by adding DNA sequences to the ends of chromosomes, thus potentially extending cell's lifespan.", "correct": true}, {"label": "D", "text": "Telomerase is a Ribozyme delaying cell aging.", "correct": false}], "correct_answer": "C. Telomerase prevents the shortening of telomeres by adding DNA sequences to the ends of chromosomes, thus potentially extending cell's lifespan.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/TncpFcOIw8xNQzm4IWxO1737445987.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/9py85Zj9HdVwBGEwgkiJ1739726194.mp3", "video": ""}, {"text": "Which of the following statements is correct about the concept of the Hayflick Limit?", "options": [{"label": "A", "text": "The ageing of cells is not determined by telomere length.", "correct": false}, {"label": "B", "text": "It refers to the age at which cells cease all metabolic activities and undergo apoptosis.", "correct": false}, {"label": "C", "text": "A cell typically undergoes 20-40 cell divisions before reaching senescence.", "correct": false}, {"label": "D", "text": "It represents the average number of times a cell can divide before experiencing replicative senescence.", "correct": true}], "correct_answer": "D. It represents the average number of times a cell can divide before experiencing replicative senescence.", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2dCMzrMyeG32uLxwneNU1749020165.mp3", "video": ""}, {"text": "How do “Sirtuins” contribute to cellular ageing?", "options": [{"label": "A", "text": "By accelerating telomere shortening.", "correct": false}, {"label": "B", "text": "By enhancing cell repair mechanisms and exerting anti-ageing effects.", "correct": true}, {"label": "C", "text": "By functioning as histone acetyltransferases, promoting chromatin condensation.", "correct": false}, {"label": "D", "text": "By decreasing insulin sensitivity", "correct": false}], "correct_answer": "B. By enhancing cell repair mechanisms and exerting anti-ageing effects.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/5qLZSomAcWDMzTtR3c1c1739726483.mp3", "video": ""}, {"text": "A 36-year-old male presents to the clinic with complaints of bilateral cataracts, short stature, premature greying and loss of hair, and skin changes. He also reports joint stiffness and pain, as well as type 2 diabetes mellitus. On examination, the patient appears older than his stated age, with characteristic \"bird-like\" facies and a high-pitched voice. Which of the following conditions is most likely to be associated with his presentation?", "options": [{"label": "A", "text": "Hutchinson-Gilford Syndrome", "correct": false}, {"label": "B", "text": "Werner syndrome", "correct": true}, {"label": "C", "text": "Wermer syndrome", "correct": false}, {"label": "D", "text": "Cockayne Syndrome", "correct": false}], "correct_answer": "B. Werner syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/LxXmYxb8xjoMyTque6aT1737446083.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/4PFa6Bk8ZCNoICFOJZks1739726969.mp3", "video": ""}, {"text": "Which cellular process is primarily responsible for the degradation and recycling of unnecessary or dysfunctional cellular components?", "options": [{"label": "A", "text": "Autophagy", "correct": true}, {"label": "B", "text": "Necrosis", "correct": false}, {"label": "C", "text": "Apoptosis", "correct": false}, {"label": "D", "text": "Pyroptosis", "correct": false}], "correct_answer": "A. Autophagy", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/z0Q2BXi4vKlXlSNCrCjh1739729108.mp3", "video": ""}, {"text": "What is the mechanism by which chaperone-mediated autophagy (CMA) targets misfolded proteins for degradation?", "options": [{"label": "A", "text": "Direct uptake by lysosomes via endocytosis", "correct": false}, {"label": "B", "text": "Activation of mTOR leading to inhibition of ULK1 complex", "correct": false}, {"label": "C", "text": "Selective degradation of damaged or dysfunctional mitochondria", "correct": false}, {"label": "D", "text": "Binding of chaperones to misfolded proteins, followed by lysosomal entry via LAMP2A for autophagy", "correct": true}], "correct_answer": "D. Binding of chaperones to misfolded proteins, followed by lysosomal entry via LAMP2A for autophagy", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/G5GoN6MX0SBvnO5VZMry1739729401.mp3", "video": ""}, {"text": "Which of the following biomarkers is associated with autophagy?", "options": [{"label": "A", "text": "Annexin A1", "correct": false}, {"label": "B", "text": "Annexin V", "correct": false}, {"label": "C", "text": "Beclin 1", "correct": false}, {"label": "D", "text": "LC3", "correct": true}], "correct_answer": "D. LC3", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ZDBIbZ4rFMW27VSHotR21739729608.mp3", "video": ""}, {"text": "Which statement accurately distinguishes between hypertrophy and hyperplasia?", "options": [{"label": "A", "text": "Hypertrophy involves an increase in cell number, while hyperplasia involves an increase in cell size.", "correct": false}, {"label": "B", "text": "Hypertrophy increases tissue mass, while hyperplasia maintains tissue mass.", "correct": false}, {"label": "C", "text": "Hypertrophy is irreversible, while hyperplasia is reversible.", "correct": false}, {"label": "D", "text": "Hypertrophy results from increased cellular protein production, while hyperplasia involves growth factor-driven proliferation of mature cells.", "correct": true}], "correct_answer": "D. Hypertrophy results from increased cellular protein production, while hyperplasia involves growth factor-driven proliferation of mature cells.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/eAMe7ysR5xQ2TVFcZ8UR1739730346.mp3", "video": ""}, {"text": "A 45-year-old female presents with irregular and heavy menstrual bleeding for the past six months. She reports experiencing prolonged periods lasting more than ten days with excessive bleeding, abdominal discomfort, and pelvic pain during her menstrual cycle. On further evaluation, transvaginal ultrasound reveals thickening of the endometrial lining. Endometrial biopsy confirms the presence of abnormal glandular proliferation without cytologic atypia. Which of the following best describes the cellular adaptation observed in this clinical scenario?", "options": [{"label": "A", "text": "Physiological hypertrophy", "correct": false}, {"label": "B", "text": "Pathological hypertrophy", "correct": false}, {"label": "C", "text": "Physiological hyperplasia", "correct": false}, {"label": "D", "text": "Pathological hyperplasia", "correct": true}], "correct_answer": "D. Pathological hyperplasia", "question_images": [], "explanation_images": [], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Examples</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Physiological hypertrophy</strong><br/>\n<strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increase in the size of cells, resulting in organ <span class=\"customMeta\" data-dictid=\"41e56d9a54169277718724ff8c225f\">enlargement</span> due to increased functional demand or hormonal stimulation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Uterine <span class=\"customMeta\" data-dictid=\"3baac9012a1692777189cb4dc70c04\">hypertrophy</span> during pregnancy due to <span class=\"customMeta\" data-dictid=\"f5499837d31692777187477cd15613\">estrogenic</span> hormone signalling.</li>\n<li>Bulging of muscles in bodybuilders due to increased demand.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Pathological hypertrophy</strong><br/>\n<strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cell <span class=\"customMeta\" data-dictid=\"41e56d9a54169277718724ff8c225f\">enlargement</span> occurs in response to increased workload or stress. It typically occurs in tissues with limited capacity for cell division, such as <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> or skeletal muscle.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Heart <span class=\"customMeta\" data-dictid=\"41e56d9a54169277718724ff8c225f\">enlargement</span> from <span class=\"customMeta\" data-dictid=\"45372f6c361692777189ff3209e642\">hypertension</span> or valvular disease.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Physiological hyperplasia</strong><br/>\n<strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>An increase in the number of cells in response to hormonal or growth factor <span class=\"customMeta\" data-dictid=\"7f3792072b1692777199fd8e2c4f59\">stimulation</span> in situations where there is a need to increase functional capacity or compensate for damage.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Breast <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> during <span class=\"customMeta\" data-dictid=\"c284c4252f16927771963c07a95e13\">puberty</span> or pregnancy.</li>\n<li>Liver <span class=\"customMeta\" data-dictid=\"91229d427e169277719753f25af9f0\">regeneration</span> after partial hepatectomy.</li>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> <span class=\"customMeta\" data-dictid=\"4c5d5ef6c31692777189820d4b320d\">hyperplasia</span> in response to blood cell deficiency.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathological hyperplasia</strong><br/>\n<strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs when there is an <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> increase in the number of cells in an organ or tissue due to excessive or inappropriate hormonal or growth factor stimulation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Endometrial <span class=\"customMeta\" data-dictid=\"4c5d5ef6c31692777189820d4b320d\">hyperplasia</span> due to <span class=\"customMeta\" data-dictid=\"4586eccbe71692777186e577e31829\">disturbance</span> in estrogen-progesterone balance.</li>\n<li>Benign prostatic <span class=\"customMeta\" data-dictid=\"4c5d5ef6c31692777189820d4b320d\">hyperplasia</span> due to <span class=\"customMeta\" data-dictid=\"6b8cd2ccb91692777181ea2591a76a\">androgenic</span> hormonal stimulation.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Note:</strong></p>\n<ul>\n<li>Pregnant <span class=\"customMeta\" data-dictid=\"0c847ca20416927772011b3397c2fd\">uterus</span> shows both <span class=\"customMeta\" data-dictid=\"3baac9012a1692777189cb4dc70c04\">hypertrophy</span> (most common) and hyperplasia.</li>\n<li>The single best answer is Hypertrophy.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/QkrWfeRpJFm4RJE7Q6lz1739730598.mp3", "video": ""}, {"text": "Which of the following statements about the mechanism of hypertrophy is inaccurate?", "options": [{"label": "A", "text": "Activation of G-protein-coupled receptor-initiated pathways", "correct": false}, {"label": "B", "text": "Stimulation of growth factor production such as TGF-β and IGF1", "correct": false}, {"label": "C", "text": "Inhibition of transcription factors like GATA4, MEF2, NFAT", "correct": true}, {"label": "D", "text": "Activation of downstream pathways including the PI3K/AKT pathway", "correct": false}], "correct_answer": "C. Inhibition of transcription factors like GATA4, MEF2, NFAT", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/kWP3RPbMBuHI6w3hRQVM1739732028.mp3", "video": ""}, {"text": "Which of the following is an example of physiological atrophy?", "options": [{"label": "A", "text": "Testicular atrophy due to hypogonadism", "correct": false}, {"label": "B", "text": "Intestinal villi atrophy in malabsorption syndromes", "correct": false}, {"label": "C", "text": "Reduction in thymus gland size during ageing", "correct": true}, {"label": "D", "text": "Brain atrophy in neurodegenerative diseases", "correct": false}], "correct_answer": "C. Reduction in thymus gland size during ageing", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/BmO6rgGdtZd1V91PSJxM1739731757.mp3", "video": ""}, {"text": "Which type of atrophy is observed in a patient with smaller and weaker muscles who is bedridden for several weeks?", "options": [{"label": "A", "text": "Disuse atrophy", "correct": true}, {"label": "B", "text": "Neurogenic atrophy", "correct": false}, {"label": "C", "text": "Endocrine atrophy", "correct": false}, {"label": "D", "text": "Senile atrophy", "correct": false}], "correct_answer": "A. Disuse atrophy", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/zCp9FelTkMwcgg5IQVDF1739731442.mp3", "video": ""}, {"text": "Which type of metaplasia characterizes the histological changes observed in Barrett's oesophagus?", "options": [{"label": "A", "text": "Transformation of columnar epithelium to squamous epithelium", "correct": false}, {"label": "B", "text": "Replacement of squamous epithelium with columnar epithelium containing goblet cells", "correct": true}, {"label": "C", "text": "Conversion of glandular epithelium to squamous epithelium", "correct": false}, {"label": "D", "text": "Substitution of mesenchymal cells with epithelial cells", "correct": false}], "correct_answer": "B. Replacement of squamous epithelium with columnar epithelium containing goblet cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/LdO4wfwPqkpCmbJBJ6S01737446201.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/8sMw67Cwuh11a8HlkbuD1739731236.mp3", "video": ""}, {"text": "Which of the following statements regarding metaplasia is true?", "options": [{"label": "A", "text": "Metaplasia refers to the abnormal growth of cells, often leading to cancer.", "correct": false}, {"label": "B", "text": "It is a reversible change in which one adult cell type is replaced by another adult cell type.", "correct": true}, {"label": "C", "text": "Metaplasia is always a pathological process and never occurs in response to normal physiological stimuli.", "correct": false}, {"label": "D", "text": "Metaplasia is characterized by the replacement of differentiated cells with undifferentiated stem cells.", "correct": false}], "correct_answer": "B. It is a reversible change in which one adult cell type is replaced by another adult cell type.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/lQcPJoCqkDbnNoIULWOZ1739731074.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following pathological conditions involves the accumulation of pigments through exogenous sources?", "options": [{"label": "A", "text": "Chronic venous insufficiency", "correct": false}, {"label": "B", "text": "Vitiligo", "correct": false}, {"label": "C", "text": "Obstructive jaundice", "correct": false}, {"label": "D", "text": "Coal worker’s pneumoconiosis", "correct": true}], "correct_answer": "D. Coal worker’s pneumoconiosis", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Exogenous pigments</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Endogenous pigments</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>They originate from external sources and are introduced into the body through environmental exposure or ingestion.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>They are naturally produced within the body as a result of <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> processes.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>E.g.</p>\n<ul>\n<li>Carbon <span class=\"customMeta\" data-dictid=\"05e2e2617c16927771952bcbeea08b\">pigment</span> (exogenous carbon or coal dust)</li>\n<li>Tattoo ink (skin tattooing)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>E.g.</p>\n<ul>\n<li>Melanin</li>\n<li>Hemosiderin</li>\n<li>Bilirubin</li>\n<li>Lipofuscin</li>\n<li>Porphyrins</li>\n<li>Homogentisic acid (darkens on exposure to air)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/5h6arH51DI9KS5J63OpM1739770195.mp3", "video": ""}, {"text": "A 83-year-old man presents to his gastroenterologist with complaints of fatigue and discomfort in the upper abdomen. He has a history of hypertension and type 2 diabetes mellitus, for which he takes medications regularly. On physical examination, the liver edge is palpable below the right costal margin, indicating hepatomegaly. Laboratory investigations reveal mildly elevated liver enzymes. Which of the following pigments is most likely responsible for the brown discolouration of the liver observed in this patient?", "options": [{"label": "A", "text": "Melanin", "correct": false}, {"label": "B", "text": "Glycogen", "correct": false}, {"label": "C", "text": "Lipofuscin", "correct": true}, {"label": "D", "text": "Bilirubin", "correct": false}], "correct_answer": "C. Lipofuscin", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/GsIodR4Dn5cHISzP1B5E1737447569.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents with a painless, slow-growing, pigmented lesion on her back with irregular borders and varying shades of brown and black. Excisional biopsy of the lesion is performed, and histopathological examination reveals nests of melanocytes within the dermis, with prominent melanin pigment deposition. Which of the following staining techniques would be most suitable for visualization of the melanin pigment within the melanocytes in this patient's biopsy specimen?", "options": [{"label": "A", "text": "Massaon Fontana stain", "correct": true}, {"label": "B", "text": "Masson Trichome stain", "correct": false}, {"label": "C", "text": "Periodic-Acid-Schiff (PAS) stain", "correct": false}, {"label": "D", "text": "Immunohistochemical staining for Melan- A", "correct": false}], "correct_answer": "A. Massaon Fontana stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/UmfulnCB5w6cWC6NuhKu1737447688.png", "https://image.prepladder.com/content/F1Aj90gKwKlwbviBkRQS1737447721.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/YteR4a5Aj0vcNruknHHh1739771006.mp3", "video": ""}, {"text": "A 45-year-old man presents with complaints of fatigue, joint pain, and abdominal discomfort. On examination, he exhibits bronze-coloured skin pigmentation mainly on the face and hands. Laboratory tests reveal elevated serum ferritin levels and transferrin saturation. Which of the following staining techniques would be most appropriate to visualize hemosiderin deposition in tissues in this patient?", "options": [{"label": "A", "text": "Perl’s stain", "correct": true}, {"label": "B", "text": "Lillie's stain", "correct": false}, {"label": "C", "text": "Rhodanine stain", "correct": false}, {"label": "D", "text": "Supravital stains", "correct": false}], "correct_answer": "A. Perl’s stain", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/zL7yR8XqsMYcbAaDfRBx1739812015.mp3", "video": ""}, {"text": "Which of the following pathological conditions is associated with the 'Tabby cat' effect?", "options": [{"label": "A", "text": "Diphtheria myocarditis", "correct": true}, {"label": "B", "text": "Xanthomas", "correct": false}, {"label": "C", "text": "Cholesterolosis", "correct": false}, {"label": "D", "text": "Fatty liver", "correct": false}], "correct_answer": "A. Diphtheria myocarditis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/5z6L4twj1HwPVQrFSpwW1739812390.mp3", "video": ""}, {"text": "Which of the following stains is not typically employed for the detection of lipid accumulation in histological samples?", "options": [{"label": "A", "text": "Sudan Black", "correct": false}, {"label": "B", "text": "Sudan IV", "correct": false}, {"label": "C", "text": "Oil red O", "correct": false}, {"label": "D", "text": "Toluidine blue", "correct": true}], "correct_answer": "D. Toluidine blue", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/iJyACjeSQ6EA4SF1ZxfU1737447789.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Cell/Condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Stain</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>M/c <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> in Histopathology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hematoxylin and Eosin.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>M/c <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> in Hematology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Romanowsky like Leishman, Giemsa</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reticulocyte</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Supravital (Brilliant cresyl blue), New <span class=\"customMeta\" data-dictid=\"bc09155adc169277719248f9543785\">methyl</span> blue.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphoblast</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PAS.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myeloblast</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>NSE, SBB, Oil Red-O.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Monoblast</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>NSE.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hairy cell</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TRAP.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lipid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Oil red 0, <span class=\"customMeta\" data-dictid=\"8c01495be91692777199ce2d39a057\">sudan</span> Black.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Iron</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prussian Blue.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Calcium</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Von Kossa, Alizarin red S.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glycogen</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PAS.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Copper</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rhodanine, rubeanic acid.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mast cell</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Toluidine blue</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mucin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mucicarmine, Alcian blue.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reticulin Fibres</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Silver.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elastin fibres</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Van geison, VVG.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Collagen</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Masson trichrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Melanin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Masson Fontana</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cryptococcus</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Indian Ink</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H.pylori</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Warthin Starry silver</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fungi</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Silver methenamine, PAS, GMS</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Amyloid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Congo red</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/1v9zfPAovLxJlmfR5OVr1739816145.mp3", "video": ""}, {"text": "A 60-year-old woman presents with bone pain and tenderness over her lower back. Imaging reveals multiple lytic lesions in the vertebral column. Laboratory tests indicate anaemia, elevated serum calcium levels, and monoclonal gammopathy. A bone marrow biopsy confirms plasma cell proliferation. Microscopic examination of the biopsy reveals intracellular inclusions, as shown in the image. What is the composition of the intracellular inclusions marked in the image?", "options": [{"label": "A", "text": "Aggregates of misfolded proteins", "correct": false}, {"label": "B", "text": "Clusters of ribosomes", "correct": false}, {"label": "C", "text": "Accumulations of immunoglobulins", "correct": true}, {"label": "D", "text": "Vacuoles containing lipids", "correct": false}], "correct_answer": "C. Accumulations of immunoglobulins", "question_images": ["https://image.prepladder.com/content/k82bhrl4f3G7JyPjVV1X1737447879.png"], "explanation_images": ["https://image.prepladder.com/content/Y606xGyDkefo9Gk2ZXjK1737448011.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/U4z506ULXxEgXPKXps1R1739819737.mp3", "video": ""}, {"text": "Following the resection of the pituitary adenoma in a patient with Cushing's disease, which intracellular change is most likely in residual adenoma cells?", "options": [{"label": "A", "text": "Mallory-Denk bodies", "correct": false}, {"label": "B", "text": "Lewy bodies", "correct": false}, {"label": "C", "text": "Crooke hyaline change", "correct": true}, {"label": "D", "text": "Civatte bodies", "correct": false}], "correct_answer": "C. Crooke hyaline change", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/cipqOr2Ni6cs4fBFNhgH1737448100.png", "https://image.prepladder.com/content/DStagB2QVdv7W0m1sMt71737448165.png", "https://image.prepladder.com/content/3Ml04wuVInCKaAJy0doI1737448336.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/DVbW83ip8r8WAMgHb7L01747302787.mp3", "video": ""}, {"text": "Which of the following stains would be most appropriate for visualizing glycogen deposits?", "options": [{"label": "A", "text": "Hematoxylin and eosin (H&amp;E) stain", "correct": false}, {"label": "B", "text": "Periodic acid-Schiff (PAS) stain", "correct": true}, {"label": "C", "text": "Masson's trichrome stain", "correct": false}, {"label": "D", "text": "Oil Red O stain", "correct": false}], "correct_answer": "B. Periodic acid-Schiff (PAS) stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Y4DkcezboEQbi8cMqB7D1736770870.png", "https://image.prepladder.com/content/EK79v1nD3zMpamF7nkOW1736770936.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/h6ijX3hgYHMJ3dpfq9Fl1739820114.mp3", "video": ""}, {"text": "Which of the following statements is incorrect about dystrophic calcification?", "options": [{"label": "A", "text": "It occurs in damaged or necrotic tissues.", "correct": false}, {"label": "B", "text": "It is characterized by the deposition of calcium salts in normal tissues.", "correct": true}, {"label": "C", "text": "It is often seen in areas of chronic inflammation.", "correct": false}, {"label": "D", "text": "Serum calcium levels are normal", "correct": false}], "correct_answer": "B. It is characterized by the deposition of calcium salts in normal tissues.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Dystrophic Calcification</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Metastatic Calcification</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Dead or degenerating tissues are seen.</li>\n<li>There will be a normal blood <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> count.</li>\n</ul>\n<p><strong>Some examples:</strong></p>\n<ul>\n<li>Dead Parasite</li>\n<li>TB</li>\n<li>Atheroma</li>\n<li>Monckeberg Sclerosis</li>\n</ul>\n\t\t\t \n\n\t\t\t<p>It is also called <strong>calcific <span class=\"customMeta\" data-dictid=\"db46007ad21692777192dcc160a2e2\">medial</span> degeneration.</strong></p>\n<ul>\n<li>It happens in the <span class=\"customMeta\" data-dictid=\"35814a93301692777201bab0f52c19\">tunica</span> media.</li>\n<li>Calcium occurs blue in color</li>\n<li>It occurs only as an old age phenomenon without any clinical significance.</li>\n</ul>\n<p><strong>Psammoma Bodies:</strong></p>\n<ul>\n<li>It is present as a <span class=\"customMeta\" data-dictid=\"9bb62139a81692777184648bfef564\">concentric</span> lamellation.</li>\n<li>It shows an onion-peel appearance</li>\n<li>Seen in:</li>\n<li>Papillary <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of thyroid.</li>\n<li>Papillary <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> cell cancer.</li>\n<li>meningioma.</li>\n<li>Prolactinoma</li>\n<li>Serous Cystadenocarcinoma of ovary.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Normal tissues are seen.</li>\n<li>The blood <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> level is elevated</li>\n<li>The most common organ affected due to</li>\n<li>Metastatic <span class=\"customMeta\" data-dictid=\"a1ee14c673169277718351bfe6afd4\">calcification</span> - The Lungs</li>\n</ul>\n<p><strong>Some Examples:</strong></p>\n<ul>\n<li><strong>Hyperparathyroidism</strong></li>\n<li>Cancer:</li>\n<li>RCC and Breast cancer show an</li>\n</ul>\n<p>increase of calcium.</p>\n<ul>\n<li>Vitamin D intoxication</li>\n<li>Milk <span class=\"customMeta\" data-dictid=\"b802ae0373169277718153c4d4fbaf\">alkali</span> syndrome</li>\n<li>Multiple myeloma</li>\n<li>Sarcoidosis</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following case scenarios is not indicative of metastatic calcification?", "options": [{"label": "A", "text": "A 60-year-old male with a history of chronic renal failure presented with shortness of breath and bilateral lung opacities on chest X-ray.", "correct": false}, {"label": "B", "text": "A 45-year-old female with spinal tuberculosis complained of back pain.", "correct": true}, {"label": "C", "text": "A 30-year-old male with a long-standing history of heavy milk and calcium carbonate intake now experiencing recurrent kidney stones.", "correct": false}, {"label": "D", "text": "A 55-year-old female with sarcoidosis demonstrated elevated levels of serum vitamin D and calcium.", "correct": false}], "correct_answer": "B. A 45-year-old female with spinal tuberculosis complained of back pain.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/56r6GWHU81dGrLVKQvYR1739959576.mp3", "video": ""}, {"text": "Which staining technique is commonly used to visualize calcium deposits in tissues and is particularly useful for detecting minute amounts of calcium?", "options": [{"label": "A", "text": "Masson's trichrome stain", "correct": false}, {"label": "B", "text": "Prussian blue stain", "correct": false}, {"label": "C", "text": "Alizarin Red S stain", "correct": true}, {"label": "D", "text": "Wright-Giemsa stain", "correct": false}], "correct_answer": "C. Alizarin Red S stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/fHwhebuTjZv3EH4DKUf51737448694.png", "https://image.prepladder.com/content/SmyLiokbepFaeqbgSRlF1736771187.png", "https://image.prepladder.com/content/mF8ASBoeKI4CNbEPRamd1737448474.png", "https://image.prepladder.com/content/MxjnqdMd5wXtVC0Jfost1737448559.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/HnKoyACoV55biPvbF6s41739959966.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Identify the correct statements regarding amyloidosis. Amyloidosis is called so because it looks like the deposition of starch. Beta-pleated sheets are seen. AL is a type of secondary amyloidosis. It is an extracellular protein.", "options": [{"label": "A", "text": "1, 2 and 3", "correct": false}, {"label": "B", "text": "1, 4", "correct": false}, {"label": "C", "text": "2, 3 and 4", "correct": false}, {"label": "D", "text": "1, 2 and 4", "correct": true}], "correct_answer": "D. 1, 2 and 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/YEpDA6cMAfnBhxkxiiar1746180566.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the mechanism for healing in the case of a 57-year-old male with a gradually developing swelling over the scalp region, pus discharge, and pain?", "options": [{"label": "A", "text": "Granuloma formation", "correct": false}, {"label": "B", "text": "Scab formation", "correct": false}, {"label": "C", "text": "Granulation tissue", "correct": true}, {"label": "D", "text": "Neovascularization", "correct": false}], "correct_answer": "C. Granulation tissue", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The body of an 82-year-old man has been seen for a post-mortem to determine the cause of death. You are examining a histopathological slide containing a section of his cardiac tissue where you notice some pigmentation. Which is the substance that is seen in the image given below?", "options": [{"label": "A", "text": "Melanin", "correct": false}, {"label": "B", "text": "Lipofuscin", "correct": true}, {"label": "C", "text": "Hemosiderin", "correct": false}, {"label": "D", "text": "Iron", "correct": false}], "correct_answer": "B. Lipofuscin", "question_images": ["https://image.prepladder.com/content/DBBjOUWzSbIPgKkvm0za1748155442.png"], "explanation_images": ["https://image.prepladder.com/content/rBOhDa6lOeWjN2tUo4Vh1748155453.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Among the following, which molecule is required for the presentation of the antigens by the APCs to TH2 cells?", "options": [{"label": "A", "text": "NK cells", "correct": false}, {"label": "B", "text": "G-protein coupled receptor", "correct": false}, {"label": "C", "text": "MHC", "correct": true}, {"label": "D", "text": "Lectin receptor", "correct": false}], "correct_answer": "C. MHC", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following caspases binds to Cyt c and the APAF-1 complex?", "options": [{"label": "A", "text": "Caspase 1", "correct": false}, {"label": "B", "text": "Caspase 8", "correct": false}, {"label": "C", "text": "Caspase 9", "correct": true}, {"label": "D", "text": "Caspase 4", "correct": false}], "correct_answer": "C. Caspase 9", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/sAascJ035VY96zYaAX9F1747728602.png"], "explanation": "<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top; width:328px\">\n<p><strong>Apoptosis in <span class=\"customMeta\" data-dictid=\"6c2c85ae6b16927771950809419a59\">physiological</span> conditions</strong> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top; width:296px\">\n<p><strong>Apoptosis in <span class=\"customMeta\" data-dictid=\"c0c247b89916927771948bc5e6d39c\">pathological</span> conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p>1. The removal of <span class=\"customMeta\" data-dictid=\"665d8d3c3b1692777199b748b1cd0e\">supernumerary</span> cells (in <span class=\"customMeta\" data-dictid=\"7a1ae24f701692777187a7f60bbd9f\">excess</span> of the required number) during development.</p>\n<p>2. Involution of hormone-dependent tissues on hormone withdrawal, such as endometrial cell <span class=\"customMeta\" data-dictid=\"903370f259169277718385f6060dd7\">breakdown</span> during the <span class=\"customMeta\" data-dictid=\"3a03cad6c616927771925038b55989\">menstrual</span> cycle.</p>\n<p>3. Elimination of potentially harmful self-reactive lymphocytes to prevent immune reactions against one’s own tissues.</p>\n<p>4. Death of host cells that have served their useful purpose, such as neutrophils in an <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> response and lymphocytes at the end of an immune response.</p>\n</td>\n<td>\n<p>1. DNA damage.</p>\n<p>2. Accumulation of misfolded proteins</p>\n<p>3. <span class=\"customMeta\" data-dictid=\"4bfa3e6f2c1692777181c53b124cf7\">Apoptosis</span> can be <span class=\"customMeta\" data-dictid=\"f3063c1d8b169277719018bf869980\">induced</span> during infections such as <strong>adenovirus</strong>, <strong>HIV</strong>, and <strong>viral hepatitis</strong>.</p>\n\t\t\t4. It may also contribute to <span class=\"customMeta\" data-dictid=\"e32252a2c41692777194fe542b3e35\">pathologic</span> <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> in parenchymal organs after <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> obstruction, such as occurs in the pancreas, <span class=\"customMeta\" data-dictid=\"42d0553c3916927771944110a6f15b\">parotid</span> gland, and kidney</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are crosslinking fixatives except?", "options": [{"label": "A", "text": "Glutaraldehyde", "correct": false}, {"label": "B", "text": "Formaldehyde", "correct": false}, {"label": "C", "text": "Methanol", "correct": true}, {"label": "D", "text": "Osmium tetroxide", "correct": false}], "correct_answer": "C. Methanol", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A chronic alcoholic patient presented with increasing abdominal girth. On examination, shifting dullness was present, and the liver span was less than 7cm. Histopathological examination revealed the presence of intracytoplasmic eosinophilic inclusions in hepatocytes. What is the content of these inclusions?", "options": [{"label": "A", "text": "Intermediate filaments", "correct": true}, {"label": "B", "text": "Actin", "correct": false}, {"label": "C", "text": "Microtubules", "correct": false}, {"label": "D", "text": "Fibronectin", "correct": false}], "correct_answer": "A. Intermediate filaments", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/pWreZkynQrbLC74d2gz91746443459.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70-year-old patient presented with cough, fatigue, and weight loss. He was diagnosed with squamous cell carcinoma on bronchoscopy. The resected specimen had a hilar lymph node that was 1 cm in size and showed a black pigment. What is the black pigment likely to be?", "options": [{"label": "A", "text": "Anthracotic pigment", "correct": true}, {"label": "B", "text": "Melanin", "correct": false}, {"label": "C", "text": "Lipochrome", "correct": false}, {"label": "D", "text": "Hemosiderin", "correct": false}], "correct_answer": "A. Anthracotic pigment", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/bgy4zLYMQ0KHMILGBYzF1746438770.png", "https://image.prepladder.com/notes/mwrORIiIxgjHncfwMtn91746438926.png", "https://image.prepladder.com/notes/Ic1ydr3xuVh5R1HaTxmN1746438842.png", "https://image.prepladder.com/notes/LoT1hZ0CfFbxyTPaB2Qz1746438888.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Supravital stains are used in the identification of all except?", "options": [{"label": "A", "text": "Reticulocytes", "correct": false}, {"label": "B", "text": "Copper in tissue", "correct": true}, {"label": "C", "text": "Heinz bodies", "correct": false}, {"label": "D", "text": "Ribosomal RNA", "correct": false}], "correct_answer": "B. Copper in tissue", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/JWbEVmMCa1mbFi4KA9Lv1746084794.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 24-year-old male was brought to the emergency department after suffering severe injuries in a motorcycle accident. His blood pressure was 80/60 mm Hg, and he was tachycardic with cold, clammy skin. An ultrasound examination revealed a ruptured spleen. Arterial blood gas analysis was suggestive of metabolic acidosis. Which of the following conditions most likely caused the patient to suffer?", "options": [{"label": "A", "text": "Cardiogenic shock", "correct": false}, {"label": "B", "text": "Septic shock", "correct": false}, {"label": "C", "text": "Hypovolemic shock", "correct": true}, {"label": "D", "text": "Neurogenic shock", "correct": false}], "correct_answer": "C. Hypovolemic shock", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Cell-in-cell appearance is seen in which of the following?", "options": [{"label": "A", "text": "Necrosis", "correct": false}, {"label": "B", "text": "Apoptosis", "correct": false}, {"label": "C", "text": "Necroptosis", "correct": false}, {"label": "D", "text": "Entosis", "correct": true}], "correct_answer": "D. Entosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/9g1A42DhBYQhiAwii9Ca1746692120.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Senile atrophy occurs due to which of the following?", "options": [{"label": "A", "text": "Denervation", "correct": false}, {"label": "B", "text": "Decreased nutrition", "correct": false}, {"label": "C", "text": "Decreased workload", "correct": false}, {"label": "D", "text": "Reduced blood supply", "correct": true}], "correct_answer": "D. Reduced blood supply", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding sirtuins? Increases insulin sensitivity and glucose metabolism Promotes genes that increase longevity They are of 7 types They are one of the types of histone deacetylases", "options": [{"label": "A", "text": "1, 2, 3", "correct": false}, {"label": "B", "text": "1, 2, 3, 4", "correct": true}, {"label": "C", "text": "2, 3", "correct": false}, {"label": "D", "text": "2, 4", "correct": false}], "correct_answer": "B. 1, 2, 3, 4", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All are features of irreversible injury except:", "options": [{"label": "A", "text": "Blebs formation", "correct": true}, {"label": "B", "text": "Karyolysis", "correct": false}, {"label": "C", "text": "Amorphous densities", "correct": false}, {"label": "D", "text": "Pyknotic nucleus", "correct": false}], "correct_answer": "A. Blebs formation", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - B\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is an anti-apoptotic gene?", "options": [{"label": "A", "text": "BAK", "correct": false}, {"label": "B", "text": "MCL1", "correct": true}, {"label": "C", "text": "PUMA", "correct": false}, {"label": "D", "text": "BAD", "correct": false}], "correct_answer": "B. MCL1", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following are features describing necrosis? Cell swelling Disrupted cell membrane Induces inflammation Physiological", "options": [{"label": "A", "text": "1 and 2", "correct": false}, {"label": "B", "text": "1, 2 and 4", "correct": false}, {"label": "C", "text": "1, 2 and 3", "correct": true}, {"label": "D", "text": "1 and 3", "correct": false}], "correct_answer": "C. 1, 2 and 3", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following diseases is caused by abnormal folding of proteins?", "options": [{"label": "A", "text": "Creutzfelt Jakob disease", "correct": true}, {"label": "B", "text": "Cirrhosis", "correct": false}, {"label": "C", "text": "Nephritic syndrome", "correct": false}, {"label": "D", "text": "Sickle cell anemia", "correct": false}], "correct_answer": "A. Creutzfelt Jakob disease", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which type of amyloidosis is seen in patients undergoing dialysis?", "options": [{"label": "A", "text": "A-beta", "correct": false}, {"label": "B", "text": "β2-microglobulin", "correct": true}, {"label": "C", "text": "aTTR", "correct": false}, {"label": "D", "text": "AL", "correct": false}], "correct_answer": "B. β2-microglobulin", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Important amyloid-disease associations</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Amyloid</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Multiple <span class=\"customMeta\" data-dictid=\"aa6a0dfcb61692777193561ed10fac\">myeloma</span> and other <span class=\"customMeta\" data-dictid=\"b2b82438d6169277719287eb450079\">monoclonal</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell disorders</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>AL <strong>(Option D ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Chronic inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>AA</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Alzheimer’s disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Aβ <strong>(Option A ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Familial <span class=\"customMeta\" data-dictid=\"51ad856e041692777181f80c9d507a\">amyloid</span> polyneuropathy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>ATTR (mutated <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of transthyretin) (Option C ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Diabetes mellitus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>AIAPP</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hemodialysis associated amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Aβ<sub>2</sub>m <strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Familial Mediterranean Fever</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>AA</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Senile <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>ATTR (Increased quantity of TTR, no <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> is seen)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Medullary <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the thyroid</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Acal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Isolated atrial amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>AANF</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Apoptotic bodies comprise of?", "options": [{"label": "A", "text": "Include cytoplasm + intranuclear material + organelle", "correct": true}, {"label": "B", "text": "Cytoplasm + organelle", "correct": false}, {"label": "C", "text": "Organelle + intranuclear material", "correct": false}, {"label": "D", "text": "Only organelle", "correct": false}], "correct_answer": "A. Include cytoplasm + intranuclear material + organelle", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/oPPoXl5qCCIolpWzuKh11747305452.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Physiological <span class=\"customMeta\" data-dictid=\"4bfa3e6f2c1692777181c53b124cf7\">Apoptosis</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Pathological Apoptosis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>The removal of <span class=\"customMeta\" data-dictid=\"665d8d3c3b1692777199b748b1cd0e\">supernumerary</span> cells (in <span class=\"customMeta\" data-dictid=\"7a1ae24f701692777187a7f60bbd9f\">excess</span> of the required number) during development.</li>\n</ul>\n<ul>\n<li>Involution of hormone-dependent tissues on hormone withdrawal, such as endometrial cell <span class=\"customMeta\" data-dictid=\"903370f259169277718385f6060dd7\">breakdown</span> during the <span class=\"customMeta\" data-dictid=\"3a03cad6c616927771925038b55989\">menstrual</span> cycle.</li>\n</ul>\n<ul>\n<li>Elimination of potentially harmful self-reactive lymphocytes to prevent immune reactions against one’s own tissues.</li>\n</ul>\n<ul>\n<li>Death of host cells that have served their useful purpose, such as neutrophils in an <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> response and lymphocytes at the end of an immune response.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>DNA damage.</li>\n<li>Accumulation of misfolded proteins</li>\n<li>Apoptosis can be <span class=\"customMeta\" data-dictid=\"f3063c1d8b169277719018bf869980\">induced</span> during certain infections- as in <span class=\"customMeta\" data-dictid=\"a122cc5a281692777180084ac1edd5\">adenovirus</span> and HIV infections and <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> hepatitis.</li>\n<li>It may also contribute to <span class=\"customMeta\" data-dictid=\"e32252a2c41692777194fe542b3e35\">pathologic</span> <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> in parenchymal organs after <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> obstruction, such as occurs in the pancreas, <span class=\"customMeta\" data-dictid=\"42d0553c3916927771944110a6f15b\">parotid</span> gland, and kidney.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a true statement about apoptosis?", "options": [{"label": "A", "text": "ATP-dependent programmed cell death", "correct": true}, {"label": "B", "text": "Intrinsic and extrinsic pathways; both pathways activate interleukins", "correct": false}, {"label": "C", "text": "Karyolysis is present", "correct": false}, {"label": "D", "text": "Cell membrane do not remain intact", "correct": false}], "correct_answer": "A. ATP-dependent programmed cell death", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - ATP-dependent programmed cell death\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a sign of irreversible cell injury?", "options": [{"label": "A", "text": "Amorphous densities in mitochondria", "correct": true}, {"label": "B", "text": "Bleb formation", "correct": false}, {"label": "C", "text": "Loss of microvilli", "correct": false}, {"label": "D", "text": "Cell swelling", "correct": false}], "correct_answer": "A. Amorphous densities in mitochondria", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"837f5783cf1692777181d8a586fd8c\">Amorphous</span> densities in mitoch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "If DNA is damaged in the cell cycle , which gene causes cell cycle arrest?", "options": [{"label": "A", "text": "RB", "correct": false}, {"label": "B", "text": "Myc", "correct": false}, {"label": "C", "text": "p53", "correct": true}, {"label": "D", "text": "KRAS", "correct": false}], "correct_answer": "C. p53", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - p53\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Cell cycle phase</strong></td>\n<td style=\"text-align:center\"><strong>Associated gene</strong></td>\n<td style=\"text-align:center\"><strong>Associated cyclin</strong></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">G1 phase</td>\n<td style=\"text-align:center\">RB gene</td>\n<td style=\"text-align:center\">Cyclin D</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">S phase</td>\n<td style=\"text-align:center\">E2F gene family</td>\n<td style=\"text-align:center\">Cyclin E</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">G2 phase</td>\n<td style=\"text-align:center\">Cyclin-dependent <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> 1</td>\n<td style=\"text-align:center\">Cyclin A</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">M phase</td>\n<td style=\"text-align:center\">Cyclin-dependent <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> 1</td>\n<td style=\"text-align:center\">Cyclin B</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What type of calcification is likely to be seen in a 58-year-old man who died 24 hours after experiencing substernal chest pain radiating to the left arm, with an autopsy revealing an obstructing atheromatous plaque in the left anterior descending artery?", "options": [{"label": "A", "text": "Dystrophic with increased serum calcium", "correct": false}, {"label": "B", "text": "Metastatic with increased serum calcium", "correct": false}, {"label": "C", "text": "Dystrophic with normal serum calcium", "correct": true}, {"label": "D", "text": "Metastatic with normal serum calcium", "correct": false}], "correct_answer": "C. Dystrophic with normal serum calcium", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Dystrophic with <span class=\"customMeta\" data-dictid=\"ebad645d7d16927771934e2243038a\">normal serum</span> calciu\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Metastatic calcification</strong></td>\n<td style=\"text-align:center\"><strong>Dystrophic calcification</strong></td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>Metastatic <span class=\"customMeta\" data-dictid=\"a1ee14c673169277718351bfe6afd4\">calcification</span> is caused by increased <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> <span class=\"customMeta\" data-dictid=\"189b6fc834169277719580eb39bb4c\">phosphate</span> in the blood and may result from hypercalcemia, hyperphosphatemia, or both</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>The deposition of <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> salt in degenerated tissues in the absence of a <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"2cc844bc9c1692777189739abf1dc5\">imbalance</span> is called dystrophic calcification</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>It is commonly associated with hyperparathyroidism, sarcoidosis, metastatic disease, and myeloma</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>It is mostly associated with trauma, inflammation, or infection</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which lymphoma is strongly associated with overexpression of Bcl-2?", "options": [{"label": "A", "text": "Follicular lymphoma", "correct": true}, {"label": "B", "text": "Burkitt lymphoma", "correct": false}, {"label": "C", "text": "Diffuse large cell lymphoma", "correct": false}, {"label": "D", "text": "Chronic lymphocytic leukemia", "correct": false}], "correct_answer": "A. Follicular lymphoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"031a38f17a16927772036476ede2ae\">Follicular</span> lymph\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the type of necrosis seen in the vessel wall of a patient with polyarteritis nodosa?", "options": [{"label": "A", "text": "Fibrinoid necrosis", "correct": true}, {"label": "B", "text": "Gangrenous necrosis", "correct": false}, {"label": "C", "text": "Fat necrosis", "correct": false}, {"label": "D", "text": "Caseous necrosis", "correct": false}], "correct_answer": "A. Fibrinoid necrosis", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"43b1f01822169277720222a3b354dd\">Fibrinoid</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the anti-apoptotic factor among the following:", "options": [{"label": "A", "text": "p53", "correct": false}, {"label": "B", "text": "KRAS", "correct": false}, {"label": "C", "text": "Bcl-2", "correct": true}, {"label": "D", "text": "BAK", "correct": false}], "correct_answer": "C. Bcl-2", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Bcl-2\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Anti-apoptotic factors</strong></td>\n<td style=\"text-align:center\"><strong>Pro-apoptotic factors</strong></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Bcl-2</td>\n<td style=\"text-align:center\">BAX</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Bcl-xL</td>\n<td style=\"text-align:center\">BAK</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">MCL-1</td>\n<td style=\"text-align:center\">BAD</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">XIAP</td>\n<td style=\"text-align:center\">BID</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Liquefactive necrosis is seen in which of the following?", "options": [{"label": "A", "text": "Heart", "correct": false}, {"label": "B", "text": "Brain", "correct": true}, {"label": "C", "text": "Lungs", "correct": false}, {"label": "D", "text": "Kidney", "correct": false}], "correct_answer": "B. Brain", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - B\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Types of necrosis</strong></td>\n<td style=\"text-align:center\"><strong>Typical sites</strong></td>\n<td style=\"text-align:center\"><strong>Pathological features</strong></td>\n</tr>\n<tr>\n<td>Coagulative necrosis</td>\n<td>Heart, Kidney, and Spleen</td>\n<td>Preservation of tissue architecture, <span class=\"customMeta\" data-dictid=\"4b8ccd7c3516927771851fdaee3f80\">denaturation</span> of proteins, loss of nuclei, <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> appearance</td>\n</tr>\n<tr>\n<td>Liquefactive necrosis</td>\n<td>Brain, Abscesses</td>\n<td>Dissolution of cells, formation of liquid, <span class=\"customMeta\" data-dictid=\"bf33f8775d169277720289f4026e23\">viscous</span> material, loss of tissue architecture, presence of <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells</td>\n</tr>\n<tr>\n<td>Caseous necrosis</td>\n<td>Tuberculosis granulomas, Fungal infections</td>\n<td>Cheese-like appearance, <span class=\"customMeta\" data-dictid=\"2334b7498b1692777188fa8b2eee36\">granuloma</span> formation, central necrotic area surrounded by <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells</td>\n</tr>\n<tr>\n<td>Fat necrosis</td>\n<td>Pancreas, Breast, and Mesentery</td>\n<td>Focal areas of fat destruction, release of free <span class=\"customMeta\" data-dictid=\"bc6cd9a9f9169277720261812ea113\">fatty</span> acids, and formation of chalky white deposits (saponification)</td>\n</tr>\n<tr>\n<td>Gangrenous necrosis</td>\n<td>Extremities (e.g., lower limbs)</td>\n<td>Ischemic <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> of multiple tissue layers, dry or wet appearance depending on bacterial infection or presence of liquefaction</td>\n</tr>\n<tr>\n<td>Fibrinoid necrosis</td>\n<td>Blood vessels (e.g., in vasculitis)</td>\n<td>Deposition of immune complexes and <span class=\"customMeta\" data-dictid=\"18c2380be716927772020c9b2863de\">fibrin</span> within <span class=\"customMeta\" data-dictid=\"72c06d2cc71692777183b1cbaf5bae\">blood vessel</span> walls, destruction of vessel architecture, bright pink appearance</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following ions is involved in cell injury?", "options": [{"label": "A", "text": "Calcium", "correct": true}, {"label": "B", "text": "Molybdenum", "correct": false}, {"label": "C", "text": "Selenium", "correct": false}, {"label": "D", "text": "Zinc", "correct": false}], "correct_answer": "A. Calcium", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Calciu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are signs of reversible cell injury, except:", "options": [{"label": "A", "text": "Loss of microvilli", "correct": false}, {"label": "B", "text": "Cell swelling", "correct": false}, {"label": "C", "text": "Bleb formation", "correct": false}, {"label": "D", "text": "Dense mitochondrial deposit", "correct": true}], "correct_answer": "D. Dense mitochondrial deposit", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Dense mitoch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Metastatic calcification occurs in all except ?", "options": [{"label": "A", "text": "Kidney", "correct": false}, {"label": "B", "text": "Fundus of the stomach", "correct": false}, {"label": "C", "text": "Pulmonary veins", "correct": false}, {"label": "D", "text": "Atheroma", "correct": true}], "correct_answer": "D. Atheroma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Ath\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Metastatic calcification</strong></td>\n<td style=\"text-align:center\"><strong>Dystrophic calcification</strong></td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>Metastatic <span class=\"customMeta\" data-dictid=\"a1ee14c673169277718351bfe6afd4\">calcification</span> is caused by increased <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> <span class=\"customMeta\" data-dictid=\"189b6fc834169277719580eb39bb4c\">phosphate</span> in the blood and may result from hypercalcemia, hyperphosphatemia, or both</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>The deposition of <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> salt in degenerated tissues in the absence of a <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"2cc844bc9c1692777189739abf1dc5\">imbalance</span> is called dystrophic calcification</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>It is commonly associated with hyperparathyroidism, sarcoidosis, metastatic disease, and myeloma</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>It is mostly associated with trauma, inflammation, or infection</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 40 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 10-year-old child presents with a history of headaches and balance difficulties over the past few months. Histopathological examination of the biopsy shows bipolar cells with long, thin hairlike processes, dense fibrillary meshwork, and characteristic eosinophilic corkscrew-shaped inclusions. Which inclusion bodies are involved in this type of tumor?", "options": [{"label": "A", "text": "Rosenthal fibers", "correct": true}, {"label": "B", "text": "Glomeruloid bodies", "correct": false}, {"label": "C", "text": "Negri bodies", "correct": false}, {"label": "D", "text": "Lewy bodies", "correct": false}], "correct_answer": "A. Rosenthal fibers", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/irsfwXck0de4ecIA5NK21737522691.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/dXB76CnmjQRbMqqQLZ2Q1746472991.mp3", "video": ""}, {"text": "Which genetic mutation is associated with multiple bilateral renal cysts and cerebellar hemangioblastomas and a family history of renal cell carcinoma?", "options": [{"label": "A", "text": "VHL gene mutation", "correct": true}, {"label": "B", "text": "TSC 1 gene mutation", "correct": false}, {"label": "C", "text": "APC gene mutation", "correct": false}, {"label": "D", "text": "PTCH gene mutation", "correct": false}], "correct_answer": "A. VHL gene mutation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:650px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Mutation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>CNS manifestation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Von-Hippel Lindau</strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>VHL gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 3.</li>\n<li>Autosomal dominant disease.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Hemangioblastomas </strong>of the <span class=\"customMeta\" data-dictid=\"e1a4a12fb416927771841c46faf6fb\">CNS</span> (cerebellum and retina)</li>\n<li>Cysts of the pancreas, liver, and kidneys</li>\n<li>Renal cell carcinomas</li>\n<li>Pheochromocytomas.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tuberous sclerosis</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>TSC1 (Hamartin) and TSC2 (Tuberin) gene mutations.</li>\n<li>Autosomal dominant disease.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Brain-Subependymal nodules, <span class=\"customMeta\" data-dictid=\"721937292f1692777185048f04ce29\">cortical</span> tubers, <span class=\"customMeta\" data-dictid=\"3e782ca1981692777199a69e89b274\">subependymal</span> giant cell astrocytoma.</li>\n<li>Skin- Ash-leaf macules, <span class=\"customMeta\" data-dictid=\"3312dd2c3416927771983551a7aae0\">Shagreen</span> patches</li>\n<li>Renal-angiomyolipoma</li>\n<li>Heart-rhabdomyoma</li>\n<li>Lung-Lymphangioleiomyomatosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Turcot syndrome</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>APC gene mutation</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Medulloblastoma</li>\n<li>FAP</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gorlin syndrome</strong></p>\n<p><strong>(Option D) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Autosomal dominant disorder.</li>\n<li>PTCH gene mutation.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Multiple <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> cell carcinomas</li>\n<li>Medulloblastomas</li>\n<li>Ovarian fibromas</li>\n<li>Odontogenic keratocysts</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding primary CNS lymphoma?", "options": [{"label": "A", "text": "Caused by EB Virus (EBV)", "correct": true}, {"label": "B", "text": "Caused by underexpression of PDL1 gene", "correct": false}, {"label": "C", "text": "Leptomeningeal spread is common", "correct": false}, {"label": "D", "text": "Typically arises from meningeal layers.", "correct": false}], "correct_answer": "A. Caused by EB Virus (EBV)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/AdX1nVlq5HEMK4oV5AKU1737525195.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman with right-sided hearing loss, tinnitus, and vertigo has an MRI showing a mass at the right cerebellopontine angle from the vestibulocochlear nerve. Biopsy reveals encapsulated tissue with areas of dense cellularity and loose myxoid regions, as depicted in the image below. Which of the following statements is NOT true regarding this condition?", "options": [{"label": "A", "text": "Associated with NF-1 gene mutation", "correct": true}, {"label": "B", "text": "Typically exhibit verocay bodies", "correct": false}, {"label": "C", "text": "Expresses Merlin", "correct": false}, {"label": "D", "text": "Immunoreactivity for S-100", "correct": false}], "correct_answer": "A. Associated with NF-1 gene mutation", "question_images": ["https://image.prepladder.com/content/eUz5buBtotRa0clW8OzC1737524889.png"], "explanation_images": ["https://image.prepladder.com/content/3iuSKTV5hvO21n5qtt0l1737525026.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/J5pnjeWN8h65IqtDiAC71740664620.mp3", "video": ""}, {"text": "A 35-year-old female presents with persistent headaches and weakness in her right upper limbs. Imaging reveals a brain tumor that is PR+. Biopsy reveals psammoma bodies with necrosis, cellular atypia, mitosis &gt;4/hpf, and invasion of brain parenchyma. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Typical meningioma", "correct": false}, {"label": "B", "text": "Atypical meningioma", "correct": true}, {"label": "C", "text": "Anaplastic meningioma", "correct": false}, {"label": "D", "text": "Papillary meningioma", "correct": false}], "correct_answer": "B. Atypical meningioma", "question_images": ["https://image.prepladder.com/content/2P1ZjxYQQ41fIh05I3eK1737524726.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old gravid woman comes to the ODP due to a severe headache that started during her pregnancy. Investigations reveal the following. Which of the following statements is not true for the above condition?", "options": [{"label": "A", "text": "Progesterone receptor-positive", "correct": false}, {"label": "B", "text": "Risk factors include exposure to radiation", "correct": false}, {"label": "C", "text": "Associated with NF2 gene mutation", "correct": false}, {"label": "D", "text": "HPE shows perivascular pseudorosettes", "correct": true}], "correct_answer": "D. HPE shows perivascular pseudorosettes", "question_images": ["https://image.prepladder.com/content/gj4M3CgFBxg5fQDXFVgt1737524307.png"], "explanation_images": ["https://image.prepladder.com/content/3vSiwcjTnI2D6DjnNwoy1737524514.png", "https://image.prepladder.com/content/y5nAB4oDLCkbBYgw89n91737524407.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 7-year-old boy presents with a history of persistent morning headaches, vomiting, and difficulty with coordination for the past two months. MRI shows a mass in the cerebellum, and HPE shows Homer Wright's rosette. What is the most common route of metastasis?", "options": [{"label": "A", "text": "Lymphatics", "correct": false}, {"label": "B", "text": "Hematogenous", "correct": false}, {"label": "C", "text": "Drop metastasis", "correct": true}, {"label": "D", "text": "All of the above", "correct": false}], "correct_answer": "C. Drop metastasis", "question_images": ["https://image.prepladder.com/content/SrU2uX5oiQnjjmB55SJF1737523984.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old man comes to the OPD due to a severe headache and blurring of vision. MRI indicates an intraventricular mass in the posterior fossa obstructing the CSF flow. Following surgical resection, which histopathological finding is most probable on examination?", "options": [{"label": "A", "text": "Perivascular pseudorosette", "correct": true}, {"label": "B", "text": "Perinuclear halo", "correct": false}, {"label": "C", "text": "Psammoma bodies", "correct": false}, {"label": "D", "text": "Homer Wright rosettes", "correct": false}], "correct_answer": "A. Perivascular pseudorosette", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/LK3r7zVL8dDGaGuM4fLv1737523882.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 38-year-old woman has a new onset of recurrent seizures. MRI detects a frontal lobe mass. A biopsy of the mass shows cells with a perinuclear halo, as shown in the image. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Oligodendroglioma", "correct": true}, {"label": "B", "text": "Glioblastoma multiforme", "correct": false}, {"label": "C", "text": "Meningioma", "correct": false}, {"label": "D", "text": "Ependymoma", "correct": false}], "correct_answer": "A. Oligodendroglioma", "question_images": ["https://image.prepladder.com/content/7pzChI9UpDB2ZrS11pW61737522831.png"], "explanation_images": ["https://image.prepladder.com/content/QJkb7X9CrDKogMra4QqW1737522989.png", "https://image.prepladder.com/content/qZYLDUvYOOeHrpwKSwNV1737523058.png", "https://image.prepladder.com/content/zWnqSgP2jwxdPB7GMRfP1737523467.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:713px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Tumor </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Morphology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Histology </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Oligodendroglioma</strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gelatinous, grey mass with <span class=\"customMeta\" data-dictid=\"a1ee14c673169277718351bfe6afd4\">calcification</span> +/- cysts, <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> hemorrhages.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Fried egg appearance (perinuclear halo)</li>\n<li>Chicken wire vessels</li>\n<li>Calcification</li>\n<li>Perineuronal satellitosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>GBM</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Butterfly Glioma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Serpentine necrosis</li>\n<li>Pseudopalisading of tumor cells</li>\n<li>Glomeruloid bodies</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Meningioma </strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rubbery <span class=\"customMeta\" data-dictid=\"bec08dbe0c16927771864d7774d7b0\">dural</span> mass that compresses the underlying brain but can easily be separated from it.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Whorled pattern</li>\n<li>Psammoma bodies</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ependymoma </strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Arises from the ependyma-lined <span class=\"customMeta\" data-dictid=\"fc8cac43cc16927772015049bb5ab8\">ventricular</span> system:</p>\n<ul>\n<li>Floor of 4th <span class=\"customMeta\" data-dictid=\"707de303e516927772011cb80f4028\">ventricle</span> (children)</li>\n<li>Spinal cord (adults)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Perivascular pseudorosettes</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the following CNS cells and match them with their specific roles: 1.Fibrous astrocytes A.It is found primarily in white matter and maintains the blood-brain barrier 2 .Oligodendrocyte B. Line the brain's ventricles and assist in producing cerebrospinal fluid (CSF). 3.Ependymal cell C. Produce myelin sheath for fast impulse conduction in the CNS. 4.Protoplasmic astrocytes D. Phagocytize pathogens in CNS and are physiologically and embryologically unrelated to other neural cell types. 5.Microglia E. They are found in the grey matter and help maintain the appropriate concentration of neurotransmitters.", "options": [{"label": "A", "text": "1- A, 2-B, 3-C, 4-D, 5-E", "correct": false}, {"label": "B", "text": "1- A, 2-C, 3-B, 4-E, 5-D", "correct": true}, {"label": "C", "text": "1- B, 2-C, 3-A, 4-E, 5-D", "correct": false}, {"label": "D", "text": "1- E, 2-C, 3-A, 4-B, 5-D", "correct": false}], "correct_answer": "B. 1- A, 2-C, 3-B, 4-E, 5-D", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2fiP8MLvzqD4pnVS3E5d1737520595.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:618px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Astrocytes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Oligodendrocytes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Ependymal cells</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Star-shaped cells.</li>\n<li>Immunohistochemistry stain: Glial Fibrillary <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">Acidic</span> Protein (GFAP) marker.</li>\n<li>Functions: Formation of the blood-brain barrier, structural support, and repair mechanism.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Types:</strong></p>\n<ul>\n<li><strong>Fibrous astrocytes:</strong> Found in <span class=\"customMeta\" data-dictid=\"faffdfe705169277720242bf7ee9b5\">white matter</span> and contain <span class=\"customMeta\" data-dictid=\"cf8f491dba169277719075ce2b5594\">intermediate</span> filaments. <strong>(A)</strong></li>\n<li><strong>Protoplasmic astrocytes: </strong>Found in grey matter and have <span class=\"customMeta\" data-dictid=\"4f63eb15be169277718848d4b4978b\">granular</span> cytoplasm. Maintain appropriate concentration of ions and neurotransmitters. <strong>(E)</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Form <span class=\"customMeta\" data-dictid=\"47fec911a316927771933b7607bdf0\">myelin</span> on neighboring axons.</li>\n<li>Helps in the fast <span class=\"customMeta\" data-dictid=\"63bda90e3516927771848cbb473f04\">conduction</span> of impulses in the CNS. <strong>(C)</strong></li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Associated diseases:</strong></p>\n<ul>\n<li>Guillain–Barré syndrome.</li>\n<li>Multiple sclerosis.</li>\n<li>Charcot-MarieTooth disease.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Myelin stain:</strong> Luxol fast blue.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Present in ventricles of the brain.</li>\n<li>Production and <span class=\"customMeta\" data-dictid=\"337d16dac5169277718474b97f6e4a\">circulation</span> of CSF. <strong>(B)</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "According to the Anne Mayo grading system, what grade would be assigned to the tumor showing hypercellularity, nuclear atypia, and mitotic activity but no evidence of microvascular proliferation or necrosis?", "options": [{"label": "A", "text": "Grade 1", "correct": false}, {"label": "B", "text": "Grade 2", "correct": false}, {"label": "C", "text": "Grade 3", "correct": true}, {"label": "D", "text": "Grade 4", "correct": false}], "correct_answer": "C. Grade 3", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient presents with new-onset headaches, seizures, and progressive unilateral weakness. Brain MRI reveals a cerebral mass with irregular borders and heterogeneous contrast enhancement. Biopsy shows GFAP-positive glial cells. What is the possible diagnosis?", "options": [{"label": "A", "text": "Astrocytoma", "correct": true}, {"label": "B", "text": "Neurocytoma", "correct": false}, {"label": "C", "text": "Medulloblastoma", "correct": false}, {"label": "D", "text": "Meningioma", "correct": false}], "correct_answer": "A. Astrocytoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Tumors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Glial Cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Astrocytoma (Option A)</strong>, ependymoma, oligodendroglioma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Undifferentiated Cell </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Medulloblastoma (Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Neuronal Cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Neurocytoma (Option B)</strong>, Ganglioglioma, Ganglioneuroma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Meningeal Cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Meningioma (Option D)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following: 1. Neuronophagia a) 2. Rabies b) 3. Microglial nodules c) 4. Globoid bodies d)", "options": [{"label": "A", "text": "1-b,2-c,3-a,4-d", "correct": true}, {"label": "B", "text": "1-a,2-c,3-b,4-d", "correct": false}, {"label": "C", "text": "1-a,2-b,3-d,4-c", "correct": false}, {"label": "D", "text": "1-b,2-d,3-a,4-c", "correct": false}], "correct_answer": "A. 1-b,2-c,3-a,4-d", "question_images": ["https://image.prepladder.com/content/vJPn2Le04dIHio81Q6GK1737522238.png", "https://image.prepladder.com/content/xzRi15Bg8W1SLFURaFOA1737522327.png", "https://image.prepladder.com/content/qNkYttGXiOFsjdbcGbRn1737522113.png", "https://image.prepladder.com/content/KoNZCOHhi03EtFyBr0Zc1737522173.png"], "explanation_images": ["https://image.prepladder.com/content/a8A2iTKbU6dQsAFRxvSe1737521902.png", "https://image.prepladder.com/content/EC6OboLTzX0izK5qd0201737521837.png", "https://image.prepladder.com/content/pOoKMJGItqbTtNbP5vII1737521967.png", "https://image.prepladder.com/content/PD47dQLoI6lzdUJD3naL1737522009.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/AFO2IYAqG8BQw8GtsO6k1748894718.mp3", "video": ""}, {"text": "Which of the following features are not seen in Alzheimer’s Disease?", "options": [{"label": "A", "text": "Bunina bodies", "correct": true}, {"label": "B", "text": "Neuritic plaques", "correct": false}, {"label": "C", "text": "Neurofibrillary tangles", "correct": false}, {"label": "D", "text": "Hirano bodies", "correct": false}], "correct_answer": "A. Bunina bodies", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Nn4agAKTxQHB5KvbEK2P1737521353.png", "https://image.prepladder.com/content/O3z9YKQJfanthtXBJv8U1737521400.png", "https://image.prepladder.com/content/WSdzdZHbGmrWPiabyBzg1737521465.png", "https://image.prepladder.com/content/6kQinP392S05kYfMbhEQ1737521501.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:603px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Plaques</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Deposits of Aβ peptides in the neuropil.</li>\n<li>Neuritic plaques contain both Aβ 40 and Aβ 42.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tangles</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Aggregates of the microtubule-binding protein tau.</li>\n<li>Demonstrated by silver (Bielschowsky) staining.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hirano bodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Composed of Actin <strong>(intracellular inclusions)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Granulovacuolar degeneration</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Formation of small, clear vacuoles within the neurons.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Mikael Haggstrom\" data-hash=\"\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_amyloid_plaque_in_Alzheimer's_disease_-_annotated.jpg\" data-tags=\"\" height=\"3172\" src=\"https://image.prepladder.com/content/Nn4agAKTxQHB5KvbEK2P1737521353.png\" width=\"4168\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p style=\"text-align: center;\"><strong>Plaques</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mikael Haggstrom\" data-hash=\"\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_neurofibrillary_tangles_in_Alzheimer%27s_disease_-_annotated.jpg\" data-tags=\"\" height=\"4168\" src=\"https://image.prepladder.com/content/O3z9YKQJfanthtXBJv8U1737521400.png\" width=\"3593\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align: center;\"><strong>Neurofibrillary tangles</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Patho\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Hirano_bodies_in_the_Hippocampus_in_an_old_person_with_Alzheimer-related_pathology,_HE_2.JPG\" data-tags=\"\" height=\"3017\" src=\"https://image.prepladder.com/content/WSdzdZHbGmrWPiabyBzg1737521465.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align: center;\"><strong>Hirano bodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Tulemo\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:GVDs_Wiki_Final_Bar%3D20um.jpg\" data-tags=\"\" height=\"3134\" src=\"https://image.prepladder.com/content/6kQinP392S05kYfMbhEQ1737521501.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align: center;\"><strong>Granulovacuolar degeneration</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements about Alzheimer’s Disease is/are correct? 1) Due to the mutation of the APP gene on Chromosome 21 2) Alpha and Gama secretase pathways are involved 3) APOE2 is a risk factor 4) Affects the frontal, parietal, and temporal lobes.", "options": [{"label": "A", "text": "2,3", "correct": false}, {"label": "B", "text": "2,4", "correct": false}, {"label": "C", "text": "1,3", "correct": false}, {"label": "D", "text": "1,4", "correct": true}], "correct_answer": "D. 1,4", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align: center;\"><strong>Gene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align: center;\"><strong>Chromosome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align: center;\"><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>APP</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>21</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Trisomy 21 (Down’s syndrome): ↑ <span class=\"customMeta\" data-dictid=\"351e627bcf1692777181d406512336\">APP</span> → <span class=\"customMeta\" data-dictid=\"47d395a85316927771965e877c2c43\">Presenile</span> Alzheimer’s disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Presenilin 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>14</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>γ-secretase complex generates increased amounts of Aβ, particularly Aβ42.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Presenilin 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>1</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>APOE4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>19</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Early-onset Alzheimer’s disease.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents with a 6-month history of resting tremor in his right hand, which improves with movement. He reports increasing slowness in daily activities and stiffness, particularly in the morning. He has had occasional falls due to unsteadiness while walking. Physical examination reveals a shuffling gait and cogwheel rigidity. All of the following are true statements regarding this condition except?", "options": [{"label": "A", "text": "A key pathological feature in the substantia nigra neurons is observed.", "correct": false}, {"label": "B", "text": "This condition can occur due to mitochondrial dysfunction.", "correct": false}, {"label": "C", "text": "Mutations in LRRK2 are the most common cause of autosomal dominant disease.", "correct": false}, {"label": "D", "text": "Homozygous mutation of glucocerebrosidase is an important risk factor for this condition.", "correct": true}], "correct_answer": "D. Homozygous mutation of glucocerebrosidase is an important risk factor for this condition.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/eo8bJSwACUOHCw2xaSyw1737521148.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autosomal dominant PD is <strong>SNCA</strong>, a gene that encodes <strong>α-synuclein</strong>. This protein is a major component of the Lewy body, which is the <strong>diagnostic hallmark of PD.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autosomal</strong> <strong>recessive</strong> forms of PD, are caused by gene mutations that encode the proteins <strong>DJ-1, PINK1, </strong>and<strong> parkin (Option B)</strong>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mutations in the gene encoding<strong> LRRK2 (leucine-rich repeat <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> 2)</strong> are the <strong>most</strong> <strong>common</strong> <strong>cause</strong> of <strong>autosomal dominant PD</strong> <strong>(Option C)</strong>.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presented with behavioral changes and involuntary movements over the past several weeks. Neurological examination revealed ataxia and myoclonus. He passed away after 4 months, and biopsy findings of the brain tissue are shown below. Based on these findings, which of the following statements is false regarding this condition? Proteinaceous particles with single-stranded RNA cause it. It results from the misfolding of PrPsc to PrPc. Spongiform transformation is a characteristic histopathological feature It is associated with a good prognosis if diagnosed early. Familial forms are associated with specific genetic mutations.", "options": [{"label": "A", "text": "1, 2 and 4", "correct": true}, {"label": "B", "text": "1, and 4", "correct": false}, {"label": "C", "text": "2 and 4", "correct": false}, {"label": "D", "text": "3, 4 and 5", "correct": false}], "correct_answer": "A. 1, 2 and 4", "question_images": ["https://image.prepladder.com/content/tAq5ha2BMRIuUTgCg4jT1737520895.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Creutzfeldt-Jakob disease (M/C)</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Genetic: <span class=\"customMeta\" data-dictid=\"5dda3cc2ab1692777202b3b3c65bea\">Familial</span> <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> caused by PRNP mutation.</li>\n<li>Transmission: Iatrogenic</li>\n<li>Symptoms:\n\t\t\t\t<ul>\n<li>Dementia.</li>\n<li>Associated pronounced <span class=\"customMeta\" data-dictid=\"42b110efe11692777190ea5720c867\">involuntary</span> jerking muscle contractions on sudden <span class=\"customMeta\" data-dictid=\"7f3792072b1692777199fd8e2c4f59\">stimulation</span> (<strong>startle myoclonus)</strong> and cerebellar <span class=\"customMeta\" data-dictid=\"3662597407169277718640a12868f5\">dysfunction</span> (<strong>ataxia</strong>).</li>\n</ul>\n</li>\n</ul>\n<ul>\n<li>Histopathogenesis:\n\t\t\t\t<ul>\n<li><strong>Spongiform transformation of the cerebral cortex.</strong></li>\n</ul>\n</li>\n</ul>\n<ul>\n<li>Prognosis: Uniformly <strong>fatal</strong> with average survival < 7 months after the onset of symptoms.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Kuru disease</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>PAS & Congo: red positive.</strong></li>\n<li>Kuru plaques: <strong>Extracellular</strong> aggregated <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> PrP.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Fatal <span class=\"customMeta\" data-dictid=\"5dda3cc2ab1692777202b3b3c65bea\">familial</span> insomnia</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Bovine <span class=\"customMeta\" data-dictid=\"42a168437c16927771990017b153d4\">spongiform</span> encephalopathy</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 27 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is a marker of Alzheimer’s disease?", "options": [{"label": "A", "text": "Synuclein", "correct": false}, {"label": "B", "text": "Αβ 40 and 42", "correct": true}, {"label": "C", "text": "Polyglutamine", "correct": false}, {"label": "D", "text": "FUS", "correct": false}], "correct_answer": "B. Αβ 40 and 42", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Αβ 40 and 42\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td><strong>Protein </strong></td>\n<td><strong>Disease </strong></td>\n</tr>\n<tr>\n<td>A β</td>\n<td>Alzheimer's Disease </td>\n</tr>\n<tr>\n<td>Alpha-synuclein </td>\n<td>Parkinson's disease </td>\n</tr>\n<tr>\n<td>Polyglutamine aggregates </td>\n<td>Huntington's disease </td>\n</tr>\n<tr>\n<td>FUS </td>\n<td>Frontotemporal <span class=\"customMeta\" data-dictid=\"82ded933641692777191ee421dc094\">lobar</span> degeneration </td>\n</tr>\n<tr>\n<td>TDP43</td>\n<td>Frontotemporal <span class=\"customMeta\" data-dictid=\"82ded933641692777191ee421dc094\">lobar</span> degeneration </td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most common cause of berry aneurysm?", "options": [{"label": "A", "text": "Endothelial injury of the vessel due to hypertension", "correct": false}, {"label": "B", "text": "Muscle intimal elastic lamina layer defect", "correct": true}, {"label": "C", "text": "Muscle and adventitial layer defect", "correct": false}, {"label": "D", "text": "Adventitia defect", "correct": false}], "correct_answer": "B. Muscle intimal elastic lamina layer defect", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Tau protein inclusions are involved in:", "options": [{"label": "A", "text": "Alzheimer’s disease", "correct": true}, {"label": "B", "text": "Huntington's disease", "correct": false}, {"label": "C", "text": "Amyotrophic lateral sclerosis", "correct": false}, {"label": "D", "text": "CNS lymphoma", "correct": false}], "correct_answer": "A. Alzheimer’s disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2urFQH3rtshdjjZdsrBO1748155302.png", "https://image.prepladder.com/content/yM7gdesAr5Y2K8zLWuES1748155327.png", "https://image.prepladder.com/content/Il3LLCPejz1MJwTqUevw1748155311.png", "https://image.prepladder.com/content/H7DjhVp5q06y1pT5aOf01748155359.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:603px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Plaques</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<ul>\n<li>Deposits of Aβ peptides in the neuropil.</li>\n<li>They are of two types: Diffuse and <span class=\"customMeta\" data-dictid=\"5413c6a72b16927771933daef75a28\">neuritic</span> (senile).</li>\n<li>Neuritic plaques contain both Aβ 40 and Aβ 42.</li>\n<li>Diffuse plaques are predominantly made up of Aβ 42 and seen in <span class=\"customMeta\" data-dictid=\"5e54fdc4d3169277720003f231621d\">trisomy</span> 21 patients.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Tangles</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Aggregates of the microtubule-binding protein tau.</li>\n<li>Demonstrated by silver (Bielschowsky) staining.</li>\n<li>Commonly found in <span class=\"customMeta\" data-dictid=\"721937292f1692777185048f04ce29\">cortical</span> neurons, especially in the <span class=\"customMeta\" data-dictid=\"433fcc5f441692777187d3963abc73\">entorhinal</span> cortex, and in other sites such as <span class=\"customMeta\" data-dictid=\"d3b981dbf916927771961c29f24614\">pyramidal</span> cells of the hippocampus, amygdala, <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> forebrain, and <span class=\"customMeta\" data-dictid=\"127f1d277616927771975f15621776\">raphe</span> nuclei.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hirano bodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Intracellular <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> inclusions are typically found in conditions like Alzheimer's disease and Creutzfeldt–Jakob disease.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Granulovacuolar degeneration</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Formation of small, clear vacuoles within the neurons.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mikael Haggstrom\" data-hash=\"\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_amyloid_plaque_in_Alzheimer's_disease_-_annotated.jpg\" data-tags=\"\" height=\"3172\" src=\"https://image.prepladder.com/content/2urFQH3rtshdjjZdsrBO1748155302.png\" width=\"4168\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align:center\"><strong>Plaques</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mikael Haggstrom\" data-hash=\"\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_neurofibrillary_tangles_in_Alzheimer%27s_disease_-_annotated.jpg\" data-tags=\"\" height=\"4168\" src=\"https://image.prepladder.com/content/yM7gdesAr5Y2K8zLWuES1748155327.png\" width=\"3593\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align:center\"><strong>Neurofibrillary tangles</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Patho\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Hirano_bodies_in_the_Hippocampus_in_an_old_person_with_Alzheimer-related_pathology,_HE_2.JPG\" data-tags=\"\" height=\"3017\" src=\"https://image.prepladder.com/content/Il3LLCPejz1MJwTqUevw1748155311.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align:center\"><strong>Hirano bodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"CC BY SA 4.0\" data-hash=\"\" data-license=\"Tulemo\" data-source=\"https://commons.wikimedia.org/wiki/File:GVDs_Wiki_Final_Bar%3D20um.jpg\" data-tags=\"\" height=\"3134\" src=\"https://image.prepladder.com/content/H7DjhVp5q06y1pT5aOf01748155359.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align:center\"><strong>Granulovacuolar degeneration</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old female presents with the development of seizures, for which a CT-guided biopsy was done. The histopathological image showed the presence of psammoma bodies. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Astrocytoma", "correct": false}, {"label": "B", "text": "Medulloblastoma", "correct": false}, {"label": "C", "text": "Meningioma", "correct": true}, {"label": "D", "text": "Ependymoma", "correct": false}], "correct_answer": "C. Meningioma", "question_images": ["https://image.prepladder.com/content/SZU046KYFtSzP3uMcPFE1746697540.png"], "explanation_images": ["https://image.prepladder.com/content/cqPI2wBqQOqZurKuPN2B1746697592.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Tumours</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Glial Cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Astrocytoma, Ependymoma, Oligodendroglioma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Undifferentiated Cell </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Medulloblastoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Neuronal Cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Neurocytoma, Ganglioglioma, Ganglioneuroma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Meningeal Cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Meningioma</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 24-year-old patient presented with swelling in the wrist joint. Histopathological examination of the swelling revealed spindle cells with palisading of the nuclei and Verocay bodies. Which of the following is the most likely condition?", "options": [{"label": "A", "text": "Schwannoma", "correct": true}, {"label": "B", "text": "Neurofibroma", "correct": false}, {"label": "C", "text": "Neuroma", "correct": false}, {"label": "D", "text": "Glioma", "correct": false}], "correct_answer": "A. Schwannoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Ooyp3bCV562AK3qjTzHJ1745219537.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following conditions are related to the same core pathology, except:", "options": [{"label": "A", "text": "Parkinson’s disease", "correct": false}, {"label": "B", "text": "Alzheimer’s disease", "correct": true}, {"label": "C", "text": "Lewy body dementia", "correct": false}, {"label": "D", "text": "Multisystem atrophy", "correct": false}], "correct_answer": "B. Alzheimer’s disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/gOq8H2VjfF61BYnWbmNq1746554192.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Protein</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Associated Disease(s)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Aβ (Amyloid-beta)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Alzheimer disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Tau</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Alzheimer's disease, Frontotemporal <span class=\"customMeta\" data-dictid=\"82ded933641692777191ee421dc094\">lobar</span> degeneration</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>LRRK2 mutations</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Parkinson disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>α-synuclein</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Parkinson's disease, Multiple system atrophy</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>TPD-43</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Frontotemporal <span class=\"customMeta\" data-dictid=\"82ded933641692777191ee421dc094\">lobar</span> degeneration, Amyotrophic <span class=\"customMeta\" data-dictid=\"fc380e21321692777191739bd99191\">lateral</span> sclerosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>FUS</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Frontotemporal <span class=\"customMeta\" data-dictid=\"82ded933641692777191ee421dc094\">lobar</span> degeneration, Amyotrophic <span class=\"customMeta\" data-dictid=\"fc380e21321692777191739bd99191\">lateral</span> sclerosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Polyglutamine aggregates</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Huntington's disease, Some forms of <span class=\"customMeta\" data-dictid=\"1b023a99c41692777199f0afcc23f6\">spinocerebellar</span> ataxia, Spinal <span class=\"customMeta\" data-dictid=\"ef00544aba1692777183bc916b1c30\">bulbar</span> <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> atrophy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Tau (with other symptoms)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Progressive <span class=\"customMeta\" data-dictid=\"5ef5f7d035169277719997649dc97a\">supranuclear</span> palsy, Corticobasal degeneration, Chronic <span class=\"customMeta\" data-dictid=\"18034e0517169277720002aaa66d36\">traumatic</span> encephalopathy</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An electron microscopic picture of a cut section of a nerve fibre is given. Identify the area that will be affected by the most common variant of Guillain-Barre syndrome.", "options": [{"label": "A", "text": "1", "correct": false}, {"label": "B", "text": "2", "correct": true}, {"label": "C", "text": "3", "correct": false}, {"label": "D", "text": "4", "correct": false}], "correct_answer": "B. 2", "question_images": ["https://image.prepladder.com/notes/SEgLPfy6iDkfcLO9Yrzj1747125442.png"], "explanation_images": [], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>Guillain-Barré Syndrome (GBS)</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>A group of immune-mediated disorders causing <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> paralysis, clinically characterized by weakness starting in the <span class=\"customMeta\" data-dictid=\"5ff25303a01692777186731f6a4f5c\">distal</span> limbs and quickly progressing to involve <span class=\"customMeta\" data-dictid=\"bdbac654081692777196f9aab116f0\">proximal</span> muscle function, resulting in \"ascending paralysis”.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Variants</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Acute <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">Inflammatory</span> Demyelinating Polyneuropathy (AIDP)</p>\n<ul>\n<li>The most common <span class=\"customMeta\" data-dictid=\"0efdcdc9e01692777201003c81c85a\">variant</span> is in Europe & North America.</li>\n<li>Patchy <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">segmental</span> <span class=\"customMeta\" data-dictid=\"336cefd9041692777185a8959344f8\">demyelination</span> of <span class=\"customMeta\" data-dictid=\"d816ba952f1692777199fc69bd7c56\">spinal</span> cord and <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> nerves</li>\n<li>Antibodies seen:</li>\n</ul>\n<ul>\n<li>IgG <span class=\"customMeta\" data-dictid=\"4665fdd0a0169277718100f58eb0d5\">Anti</span> GM1</li>\n<li>IgG <span class=\"customMeta\" data-dictid=\"4665fdd0a0169277718100f58eb0d5\">Anti</span> GQ1b</li>\n</ul>\n<p> </p>\n<p>Axonal Variants</p>\n<ul>\n<li>Often associated with Campylobacter jejuni infection.</li>\n<li>More prevalent in China and Japan.</li>\n</ul>\n<p> </p>\n<p>Miller Fisher Syndrome</p>\n<ul>\n<li>Best-recognised variant.</li>\n<li>Associated with anti-GQ1b antibodies.</li>\n<li>Presents with internal and external ophthalmoplegia, ataxia, and areflexia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Clinical features</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Motor Symptoms:</p>\n<ul>\n<li>Progressive <span class=\"customMeta\" data-dictid=\"62f0d7c8491692777182ab7cc82edb\">ascending</span> paralysis (distal to proximal)</li>\n<li>Areflexia</li>\n<li>Weakness in legs causing rubbery legs and <span class=\"customMeta\" data-dictid=\"acb259200b16927771908888d1377c\">instability</span> to stand</li>\n<li>Truncal paralysis, quadriplegia, neck floppiness</li>\n<li>Bilateral 7th nerve palsy</li>\n<li>Bulbar palsy</li>\n</ul>\n<ul>\n<li>Difficulty in handling secretions leading to <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">aspiration</span> pneumonia</li>\n<li>A leading <span class=\"customMeta\" data-dictid=\"254dc5106d1692777183ba9ab1b3e5\">cause of death</span> due to <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">pulmonary</span> involvement.</li>\n</ul>\n<ul>\n<li>Diaphragmatic paralysis</li>\n</ul>\n<ul>\n<li>Ventilatory support is required in 30% of cases.</li>\n<li>Increased <span class=\"customMeta\" data-dictid=\"c32b3a9fac16927771831530888fdf\">carbon dioxide</span> levels.</li>\n</ul>\n<p> </p>\n<p>Sensory Symptoms:</p>\n<ul>\n<li>Glove-and-stocking distribution paresthesias</li>\n<li>Proprioception loss</li>\n</ul>\n<ul>\n<li>Difficulty in climbing stairs</li>\n<li>Pain in the neck/arm/shoulder is similar to over-exercised muscle</li>\n</ul>\n<ul>\n<li>Sensory manifestations can occur before or along with motor manifestations.</li>\n</ul>\n<p> </p>\n<p>Autonomic Symptoms:</p>\n<ul>\n<li>Autonomic <span class=\"customMeta\" data-dictid=\"3704fc52401692777186c42775c9fb\">dysregulation</span> (e.g., <span class=\"customMeta\" data-dictid=\"32742bce4316927771941ff62a9db7\">orthostatic</span> hypotension, bladder/bowel sparing/transient involvement)</li>\n<li>Wide fluctuations of blood pressure, arrhythmias, postural hypotension</li>\n<li>Reduced heart rate and blood pressure, <span class=\"customMeta\" data-dictid=\"fec88fc386169277719326fdef547f\">neurogenic</span> shock.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Investigations</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Lumbar Puncture</p>\n<ul>\n<li>CSF protein: 100-1000 mg/dL</li>\n<li>Elevated CSF protein but normal WBC count (albuminocytologic dissociation)</li>\n</ul>\n<p>CSF Study Timing</p>\n<ul>\n<li>Normal CSF findings (<48 hours)</li>\n<li>Maximum rise of protein seen by 7 days</li>\n</ul>\n<p>Electrodiagnostic Testing</p>\n<ul>\n<li>Prolonged F-wave latencies</li>\n</ul>\n<ul>\n<li>Earliest finding in AIDP (Acute <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">Inflammatory</span> Demyelinating Polyneuropathy)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p> Criteria</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p> Description</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p> Flaccid Bilateral Weakness</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Weakness of limbs (flaccid).</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p> Areflexia</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Areflexia is present in areas of weakness.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>CytoAlbuminologic dissociation</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Elevated CSF protein with normal WBC count.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p> Monophasic Illness</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Symptoms develop over 12 hours to 28 days.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p> Electrodiagnostic</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Electrodiagnostic findings are consistent with demyelination.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most common cause of berry aneurysm?", "options": [{"label": "A", "text": "Endothelial injury of the vessel due to hypertension", "correct": false}, {"label": "B", "text": "Muscle intimal elastic lamina layer defect", "correct": true}, {"label": "C", "text": "Muscle and adventitial layer defect", "correct": false}, {"label": "D", "text": "Adventitia defect", "correct": false}], "correct_answer": "B. Muscle intimal elastic lamina layer defect", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old female presents with frequent headaches. The investigation reveals raised intracranial pressure and the presence of a dural-based tumour. Which of the following histological findings correlates with the diagnosis?", "options": [{"label": "A", "text": "Fried-egg appearance", "correct": false}, {"label": "B", "text": "Flexner-Wintersteiner rosettes", "correct": false}, {"label": "C", "text": "Psammoma bodies with whorling of tumor cells", "correct": true}, {"label": "D", "text": "Homer-Wright rosettes", "correct": false}], "correct_answer": "C. Psammoma bodies with whorling of tumor cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/76i0YioH8Q5eAlmqb09A1747380216.png", "https://image.prepladder.com/content/rVa3RfwwL4ADFfCZ4cKB1746430486.png", "https://image.prepladder.com/content/Qv8D9zaqUDXXC3TIkysC1746430496.png", "https://image.prepladder.com/content/5UYoMD9a37FHKakRJNIW1746430507.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient presents with severe headaches, seizures, and progressive neurological deficits. Imaging reveals a large mass with areas of necrosis and irregular borders in the brain. The biopsy confirms the diagnosis of a malignant tumor. Which of the following options represents the most common type of brain tumor in adults?", "options": [{"label": "A", "text": "Medulloblastoma", "correct": false}, {"label": "B", "text": "Meningioma", "correct": false}, {"label": "C", "text": "Retinoblastoma", "correct": false}, {"label": "D", "text": "Glioblastoma", "correct": true}], "correct_answer": "D. Glioblastoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - G\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70-year-old patient presents with progressive memory loss, cognitive decline, and behavioral changes. Imaging reveals characteristic amyloid plaques and neurofibrillary tangles in the brain. On further investigation, the accumulation of a specific protein is found to be a hallmark of this disease. What is the protein responsible for the amyloidosis seen in Alzheimer's disease?", "options": [{"label": "A", "text": "Amyloid beta protein", "correct": true}, {"label": "B", "text": "ATTR", "correct": false}, {"label": "C", "text": "Amyloid beta 2 protein", "correct": false}, {"label": "D", "text": "Acal", "correct": false}], "correct_answer": "A. Amyloid beta protein", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Amyloid <span class=\"customMeta\" data-dictid=\"806eb8418c16927771822855b56695\">beta</span> protein: \n<table>\n<tbody>\n<tr>\n<td>Definition</td>\n<td>Alzheimer's disease is a progressive neurodegenerative disorder characterized by memory loss, cognitive decline, and behavioral changes. It is the most common cause of dementia.</td>\n</tr>\n<tr>\n<td>Prevalence</td>\n<td>Alzheimer's disease is a widespread global health issue, affecting <span class=\"customMeta\" data-dictid=\"fedf65ed431692777192f0de4f27ba\">millions</span> of people, with a higher <span class=\"customMeta\" data-dictid=\"f86aae0bd61692777196f91458c9dd\">prevalence</span> in older adults.</td>\n</tr>\n<tr>\n<td>Risk Factors</td>\n<td>- Age: The risk of developing Alzheimer's disease increases with age. - Genetics: Family history and specific genes, such as the APOE ε4 allele, play a role. - <span class=\"customMeta\" data-dictid=\"e2b5f013011692777183ea1b11ed9c\">Cardiovascular</span> health: Conditions like <span class=\"customMeta\" data-dictid=\"45372f6c361692777189ff3209e642\">hypertension</span> and diabetes may increase the risk.</td>\n</tr>\n<tr>\n<td>Stages</td>\n<td>Alzheimer's disease typically progresses through stages: - Mild cognitive <span class=\"customMeta\" data-dictid=\"4885d5d0021692777189aac6dc80f7\">impairment</span> (MCI) - Mild Alzheimer's disease - Moderate Alzheimer's disease - Severe Alzheimer's disease</td>\n</tr>\n<tr>\n<td>Clinical Features</td>\n<td>- Memory loss - Difficulty with problem-solving and planning - Language problems - Confusion - Mood changes (e.g., depression, anxiety) - <span class=\"customMeta\" data-dictid=\"40f8eaa3d01692777186cb3e1d6c69\">Disorientation</span> - Behavioral changes</td>\n</tr>\n<tr>\n<td>Diagnosis</td>\n<td>- Clinical assessment and cognitive testing. - Neuroimaging, such as <span class=\"customMeta\" data-dictid=\"7ce7bcb2f316927771938e0bea7f4d\">MRI</span> or CT scans, to rule out other causes. - Biomarkers like <span class=\"customMeta\" data-dictid=\"99a9bf133e1692777184ec4b1011fe\">cerebrospinal</span> fluid analysis or <span class=\"customMeta\" data-dictid=\"51ad856e041692777181f80c9d507a\">amyloid</span> PET scans may help confirm the diagnosis.</td>\n</tr>\n<tr>\n<td>Treatment</td>\n<td>- Medications: <span class=\"customMeta\" data-dictid=\"aefa9aaa9216927771841998c2c30a\">Cholinesterase</span> inhibitors and N-methyl-D-aspartate (NMDA) <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> antagonists may help manage symptoms. - Non-pharmacological approaches: Cognitive stimulation, physical exercise, and counseling. - Supportive care and assistance with daily living tasks.</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the disorder associated with hexanucleotide repeat?", "options": [{"label": "A", "text": "Fragile X syndrome", "correct": false}, {"label": "B", "text": "Huntington disease", "correct": false}, {"label": "C", "text": "Myotonic dystrophy", "correct": false}, {"label": "D", "text": "Frontotemporal dementia", "correct": true}], "correct_answer": "D. Frontotemporal dementia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>FTLD-tau</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>FTLD-TDP</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inclusions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytoplasmic <span class=\"customMeta\" data-dictid=\"349c5a4f5d169277720062d348498a\">tau</span> inclusions</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Inclusions contain TDP-43 (RNA-binding protein)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated mutations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Associated with mutations in the <strong>MAPT gene (encoding tau)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Expansion of a<strong> </strong><strong>hexanucleotide repeat in the 5′ region of C9orf72</strong><strong>. </strong></li>\n<li>Mutations in the TARDBP gene (encoding TDP-43)</li>\n<li>Mutations in the GRN gene</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old child presents with a lesion in the right eye. Histopathology reveals the presence of Flexner-Wintersteiner rosettes. What is the likely diagnosis?", "options": [{"label": "A", "text": "Retinoblastoma", "correct": true}, {"label": "B", "text": "Optic nerve glioma", "correct": false}, {"label": "C", "text": "Rhabdomyosarcoma", "correct": false}, {"label": "D", "text": "Ocular melanoma", "correct": false}], "correct_answer": "A. Retinoblastoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Nkt2svfgejGvyEUlWyGT1747305592.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Retinoblastoma</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>It is caused by the <span class=\"customMeta\" data-dictid=\"2f7bf58a321692777190e32a914615\">inactivation</span> of both alleles of the RB1 tumour <span class=\"customMeta\" data-dictid=\"92427347f51692777199a762a91d21\">suppressor</span> gene.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Types </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Heritable (germline):</strong>\n<ul>\n<li>It frequently leads to <span class=\"customMeta\" data-dictid=\"625feb7e3a1692777183aa9d923cfd\">bilateral</span> <span class=\"customMeta\" data-dictid=\"fc941081ef16927771970c709f1103\">retinoblastoma</span> and is caused by a <span class=\"customMeta\" data-dictid=\"7fdc76e59a169277718826b9b9806d\">germline</span> <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> in the RB1 gene in all cells, followed by a <span class=\"customMeta\" data-dictid=\"3db910d8571692777198303e3bcb27\">somatic</span> <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> in the <span class=\"customMeta\" data-dictid=\"fb7a2c30e416927771972f7df6f8c0\">retinal</span> cells.</li>\n<li>Affected individuals are also at increased risk for developing non-ocular tumours, such as osteosarcoma.</li>\n</ul>\n</li>\n<li><strong>Non-heritable (sporadic):</strong>\n<ul>\n<li>This <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> typically presents as a <span class=\"customMeta\" data-dictid=\"92b4dd0d9516927772013f2e4296b7\">unilateral</span> tumour and results from two <span class=\"customMeta\" data-dictid=\"3db910d8571692777198303e3bcb27\">somatic</span> mutations in the <span class=\"customMeta\" data-dictid=\"fb7a2c30e416927771972f7df6f8c0\">retinal</span> cells occurring after embryonic development, without a <span class=\"customMeta\" data-dictid=\"7fdc76e59a169277718826b9b9806d\">germline</span> mutation.</li>\n<li>It is not inherited and does not carry an increased risk of developing non-ocular tumours.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Occurs in young children, usually before 5 years of age (<strong>most common <span class=\"customMeta\" data-dictid=\"7b1f175723169277719459db16938e\">ocular</span> <span class=\"customMeta\" data-dictid=\"1622f69a94169277719372b76236ca\">neoplasm</span> in children</strong>).</li>\n<li>Leukocoria: White pupillary <span class=\"customMeta\" data-dictid=\"20f478f55f1692777197e351415f8f\">reflex</span> (most common presenting sign of retinoblastoma).</li>\n<li>Strabismus</li>\n<li>Painful red eye</li>\n<li>Poor vision</li>\n<li>Asymptomatic</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Fundus examination</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>A white, elevated mass in the <span class=\"customMeta\" data-dictid=\"f17d8978bd1692777197621051012f\">retina</span> is characteristic of retinoblastoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Genetic testing</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>RB1 gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 13q14</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Histopathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Flexner-Wintersteiner rosettes</strong> <strong>(highly specific)</strong><strong>: </strong>These are composed of an ‘empty’ <span class=\"customMeta\" data-dictid=\"e87def492e1692777191eda63cfc5e\">lumen</span> surrounded by columnar cells.</li>\n<li><strong>Homer-Wright rosettes</strong>: These are pseudo-rosettes and consist of cells surrounding a central <span class=\"customMeta\" data-dictid=\"e87def492e1692777191eda63cfc5e\">lumen</span> made up of their processes.</li>\n<li>Undifferentiated tumour cells.</li>\n<li>Areas of <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and calcification.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with a hand lesion, and the histopathology of the lesion is provided. Which of the following statements is incorrect?", "options": [{"label": "A", "text": "It originates from the peripheral nerve", "correct": false}, {"label": "B", "text": "Verrocay bodies are seen in light microscopy", "correct": false}, {"label": "C", "text": "Associated with neurofibromatosis", "correct": false}, {"label": "D", "text": "It is malignant and often metastasizes", "correct": true}], "correct_answer": "D. It is malignant and often metastasizes", "question_images": ["https://image.prepladder.com/content/MTuktsTBbmK6GNTuNs8B1741890566.png"], "explanation_images": ["https://image.prepladder.com/content/Tg8GP5tvcQ8unN4KsIgo1741890631.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In the WHO grading of astrocytoma, which grade does glioblastoma fall under?", "options": [{"label": "A", "text": "I", "correct": false}, {"label": "B", "text": "II", "correct": false}, {"label": "C", "text": "III", "correct": false}, {"label": "D", "text": "IV", "correct": true}], "correct_answer": "D. IV", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - IV\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td>Grade I</td>\n<td>\n<ul>\n<li>Pilocytic astrocytoma</li>\n<li>Pleomorphic xantoastrocytoma</li>\n<li>Subependymal giant cell astrocytoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>Grade II</td>\n<td>\n<ul>\n<li>Diffuse astrocytoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>Grade III</td>\n<td>\n<ul>\n<li>Anaplastic astrocytoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>Grade IV</td>\n<td>\n<ul>\n<li>Glioblastoma</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most common cause of berry aneurysm?", "options": [{"label": "A", "text": "Endothelial injury of vessel due to hypertension", "correct": false}, {"label": "B", "text": "Muscle intimal elastic lamina layer defect", "correct": true}, {"label": "C", "text": "Muscle and adventitial layer defect", "correct": false}, {"label": "D", "text": "Adventitia defect", "correct": false}], "correct_answer": "B. Muscle intimal elastic lamina layer defect", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/EWTDir9y426lDCqxVGtH1712899012.png"], "explanation": "<p>Correct Option B - Muscle <span class=\"customMeta\" data-dictid=\"0c950b29361692777190aa5f42e76b\">intimal</span> <span class=\"customMeta\" data-dictid=\"2dba7c03f61692777187254f866bcc\">elastic</span> <span class=\"customMeta\" data-dictid=\"9864ad42b21692777191febeee1002\">lamina</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a risk factor for Alzheimer’s disease?", "options": [{"label": "A", "text": "Apo E1", "correct": false}, {"label": "B", "text": "Apo E2", "correct": false}, {"label": "C", "text": "Apo E3", "correct": false}, {"label": "D", "text": "Apo E4", "correct": true}], "correct_answer": "D. Apo E4", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Apo E4\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 27 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following cell types are typically found in the anterior lobe of the pituitary gland, and which are stained pink and purple, respectively?", "options": [{"label": "A", "text": "Sommatotrophs and lactotrophs", "correct": false}, {"label": "B", "text": "Lactotrophs and thyrotrophs", "correct": true}, {"label": "C", "text": "Corticotrophs and gonadotrophs", "correct": false}, {"label": "D", "text": "Gonadotrophs and somatotrophs", "correct": false}], "correct_answer": "B. Lactotrophs and thyrotrophs", "question_images": ["https://image.prepladder.com/content/5IQ6DSve2pueCUD4zxWE1736905498.png"], "explanation_images": ["https://image.prepladder.com/content/8rgpJGGbytTpyQx9hgQ31736905614.png", "https://image.prepladder.com/content/gmcwqd1zxfs4PLj2Ns8z1736905701.png", "https://image.prepladder.com/content/A7aYAj9a8YAVb4Y59ryX1737640042.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Pituitary adenomas are often classified based on the hormones they secrete. Which of the following statements correctly matches the type of pituitary adenoma with its primary hormone secretion and associated syndrome?", "options": [{"label": "A", "text": "Prolactinoma – Secretes prolactin – Causes Cushing's disease", "correct": false}, {"label": "B", "text": "Somatotroph adenoma – Secretes growth hormone – Causes acromegaly", "correct": true}, {"label": "C", "text": "Corticotroph adenoma – Secretes thyroid-stimulating hormone – Causes hyperthyroidism", "correct": false}, {"label": "D", "text": "Gonadotroph adenoma – Secretes adrenocorticotropic hormone (ACTH) – Causes Addison's disease", "correct": false}], "correct_answer": "B. Somatotroph adenoma – Secretes growth hormone – Causes acromegaly", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Adenoma type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hormone secreted</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated condition</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prolactinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prolactin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hyperprolactinemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Somatotroph Adenoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Growth Hormone</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gigantism (Children), <span class=\"customMeta\" data-dictid=\"01f4c8035316927771800b6c1238b0\">Acromegaly</span> (Adults)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Corticotroph Adenoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adrenocorticotropic hormone (ACTH)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cushings disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gonadotroph Adenoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gonadotropins (LH and FSH)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Often <span class=\"customMeta\" data-dictid=\"d1a9a79f701692777182066af09044\">asymptomatic</span> , may cause hypogonadism</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A pathologist examines a surgically resected pituitary tumour under a microscope. The tumour comprises sheets of monomorphic, round to polygonal cells with central nuclei and sparse to absent reticulin network. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Pituitary adenoma", "correct": true}, {"label": "B", "text": "Pituitary carcinoma", "correct": false}, {"label": "C", "text": "Craniopharyngioma", "correct": false}, {"label": "D", "text": "Schwannoma", "correct": false}], "correct_answer": "A. Pituitary adenoma", "question_images": ["https://image.prepladder.com/content/TKydxPVDHK8xqgYvlZAW1736906059.png"], "explanation_images": ["https://image.prepladder.com/content/K0qZjP7YhK3nZkd0mHvr1736906145.png", "https://image.prepladder.com/content/VcviYpxaulgF9VCG8M7h1736906214.png", "https://image.prepladder.com/content/m4uepBewYx4jXUETMume1736906308.png", "https://image.prepladder.com/content/D4Ai0xYGfNsqvyjKzrni1737640305.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 12-year-old child presents with headaches, visual disturbances, and delayed growth. An MRI of the brain reveals a 3 cm cystic mass with calcifications. The growth was found to be encapsulated and multiloculated. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Oligodendroglioma", "correct": false}, {"label": "B", "text": "Meningioma", "correct": false}, {"label": "C", "text": "Craniopharyngioma", "correct": true}, {"label": "D", "text": "Pituitary adenoma", "correct": false}], "correct_answer": "C. Craniopharyngioma", "question_images": ["https://image.prepladder.com/content/kHdu79O4jSHwloVFnfla1736908881.png"], "explanation_images": ["https://image.prepladder.com/content/o81m6Kuh5r1VtZ1AZAlC1736906836.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:600px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Adamantinomatous</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Papillary</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Age group</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Children</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adults</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Epithelium</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stratified squamous</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stratified squamous</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Wet keratin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Calcifications</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cysts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stellate reticulum</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/NRPcIt8YLFPhgXUEuFfY1747307888.mp3", "video": ""}, {"text": "A 35-year-old male presents with a history of recurrent kidney stones, hypercalcemia, and a recent diagnosis of a pituitary adenoma. Which of the following syndromes is most likely associated with his clinical presentation?", "options": [{"label": "A", "text": "MEN 2A syndrome", "correct": false}, {"label": "B", "text": "MEN 2B syndrome", "correct": false}, {"label": "C", "text": "MEN 4 syndrome", "correct": false}, {"label": "D", "text": "MEN 1 syndrome", "correct": true}], "correct_answer": "D. MEN 1 syndrome", "question_images": ["https://image.prepladder.com/content/dJHsv3KdUJ7o2ii4At7A1737640537.png"], "explanation_images": [], "explanation": "<p>Correct Answer:D) <span class=\"customMeta\" data-dictid=\"e48bb8abfa1692777192e3fa06774f\">MEN</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which mutation is associated with pituitary carcinoma?", "options": [{"label": "A", "text": "AIP", "correct": false}, {"label": "B", "text": "CDKN I B", "correct": false}, {"label": "C", "text": "HRAS", "correct": true}, {"label": "D", "text": "MEN 1", "correct": false}], "correct_answer": "C. HRAS", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:453px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gene affected</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Commonly associated tumour</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>AIP</li>\n<li>PRKAR1A</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Somatotroph or <span class=\"customMeta\" data-dictid=\"5f4f4fc83e16927771911e9e162d7c\">lactotroph</span> adenoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>CDKN1 B</li>\n<li>USP8</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Corticotroph adenoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>GNAS</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Somatotroph adenoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>HRAS</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pituitary carcinoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>DICER1</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pituitary blastoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>MEN 1</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Somatotroph, lactotroph, or <span class=\"customMeta\" data-dictid=\"1e63358f6c16927771858cc6d5e921\">corticotroph</span> adenoma</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the marked cells in the histology of the parathyroid below.", "options": [{"label": "A", "text": "Oxyphil cells", "correct": false}, {"label": "B", "text": "Chief cells", "correct": true}, {"label": "C", "text": "Adipocytes", "correct": false}, {"label": "D", "text": "Parafollicular cells", "correct": false}], "correct_answer": "B. Chief cells", "question_images": ["https://image.prepladder.com/content/0UZ1HH382OiBH4HzHNRS1736907225.png"], "explanation_images": ["https://image.prepladder.com/content/yviJBIlrJn7XavPtNmv11736907295.png", "https://image.prepladder.com/content/S2aKTnSgRH8eGFxqA0qZ1736907358.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following microscopic features is most indicative of a parathyroid adenoma rather than parathyroid hyperplasia?", "options": [{"label": "A", "text": "Diffuse hyperplasia of chief cells throughout the parathyroid gland", "correct": false}, {"label": "B", "text": "Stromal fat infiltration within the parathyroid tissue", "correct": false}, {"label": "C", "text": "Intranuclear cytoplasmic inclusions within chief cells", "correct": false}, {"label": "D", "text": "Difficult to distinguish on microscopy", "correct": true}], "correct_answer": "D. Difficult to distinguish on microscopy", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following genetic mutations is most commonly associated with pheochromocytoma?", "options": [{"label": "A", "text": "Gain of function mutation in n-Myc gene", "correct": false}, {"label": "B", "text": "Gain of function mutation in RET gene", "correct": true}, {"label": "C", "text": "Loss of function mutation in the RET gene", "correct": false}, {"label": "D", "text": "Loss of function mutation in MEN 1 gene", "correct": false}], "correct_answer": "B. Gain of function mutation in RET gene", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The 4-year-old kid is brought with complaints of periorbital ecchymosis, miosis, and ptosis. CT scan reveals a tumour on the right kidney with calcifications. A biopsy reveals small, dark blue cells with scanty cytoplasm. Which mutation is most likely connected to this mass?", "options": [{"label": "A", "text": "ALK gene mutation", "correct": true}, {"label": "B", "text": "RET gene mutation", "correct": false}, {"label": "C", "text": "L-MYC gene mutation", "correct": false}, {"label": "D", "text": "VHL gene mutation", "correct": false}], "correct_answer": "A. ALK gene mutation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:692px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neuroblastoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Neural <span class=\"customMeta\" data-dictid=\"48528974ed1692777185cd29753db5\">crest</span> cell origin</li>\n<li>Most common <span class=\"customMeta\" data-dictid=\"ae83c0cf40169277718732a723c610\">extracranial</span> solid tumors of childhood.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pathogenesis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>N-Myc amplification, and ALK gene mutation</li>\n<li>Involves <span class=\"customMeta\" data-dictid=\"f955f012f716927771801d01e7d163\">adrenal</span> medulla, <span class=\"customMeta\" data-dictid=\"5731c5431416927771999e54e2563b\">sympathetic</span> chain</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinical features</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Age < 4 years</li>\n<li>Abdominal mass</li>\n<li>Opsoclonus <span class=\"customMeta\" data-dictid=\"e0f942b41616927771934975b589ae\">myoclonus</span> syndrome</li>\n<li>Periorbital <span class=\"customMeta\" data-dictid=\"8ae06fb05116927771863f729ea53c\">ecchymoses</span> (orbital metastases)</li>\n<li>Spinal cord <span class=\"customMeta\" data-dictid=\"56af81fad316927771843d2b4b1e4f\">compression</span> from <span class=\"customMeta\" data-dictid=\"6de01005f61692777187a3003970c7\">epidural</span> invasion (horner syndrome)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnostic findings</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>N-MYC gene amplification</li>\n<li>Microscopy: small round blue cells with scanty cytoplasm, Homer Wright rosettes.</li>\n<li>Labs: elevated catecholamines</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 2-year-old boy is brought with complaints of abdominal lump for 2 months. HPE of the mass is shown below. Which of the following conditions is not associated with a similar finding?", "options": [{"label": "A", "text": "Neuroblastoma", "correct": false}, {"label": "B", "text": "Medulloblastoma", "correct": false}, {"label": "C", "text": "Retinoblastoma", "correct": true}, {"label": "D", "text": "Ewing’s sarcoma", "correct": false}], "correct_answer": "C. Retinoblastoma", "question_images": ["https://image.prepladder.com/content/ONd2YbPo3VSOB8ORCwAc1736907613.png"], "explanation_images": ["https://image.prepladder.com/content/EdzNO2GMqHL1cExlLdQd1736907773.png", "https://image.prepladder.com/content/Q1xwWExOVLG3EQhRa74R1736907829.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "This histology finding is seen in all these tumors except?", "options": [{"label": "A", "text": "Pheochromocytoma", "correct": false}, {"label": "B", "text": "Carotid body tumor", "correct": false}, {"label": "C", "text": "Neuroblastoma", "correct": true}, {"label": "D", "text": "Medullary carcinoma of the thyroid", "correct": false}], "correct_answer": "C. Neuroblastoma", "question_images": ["https://image.prepladder.com/content/tqlSDhIQNFvApGgSCeg61736908017.png"], "explanation_images": ["https://image.prepladder.com/content/u3MmS5rvkfgDKEipOSsq1736908178.png", "https://image.prepladder.com/content/AbDzhTQu10nD70X8BKJM1736908313.png", "https://image.prepladder.com/content/DcXJrOXq84yymw1sFVYs1736908392.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old woman has been evaluated for intermittent headaches, insomnia, diaphoresis, and unintentional weight loss over the past several months. The patient is found to have a neoplastic mass producing excessive hormones causing symptoms. Histopathology of the same is shown below. These cells marked below stain positive for which of the following immunohistochemical markers?", "options": [{"label": "A", "text": "Synaptophysin", "correct": false}, {"label": "B", "text": "Chromogranin", "correct": false}, {"label": "C", "text": "Neuron-specific enolase", "correct": false}, {"label": "D", "text": "S-100", "correct": true}], "correct_answer": "D. S-100", "question_images": ["https://image.prepladder.com/content/0pIOTrpAs78J02UqOkEP1736908517.png"], "explanation_images": ["https://image.prepladder.com/content/FhQ7SuRASV9pkfc91RUr1736908607.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old woman presents to her primary care physician with a recent diagnosis of medullary thyroid carcinoma (MTC). She reports no significant family history of endocrine disorders. Laboratory investigations show elevated levels of serum calcium and plasma catecholamines and metanephrines. What is the most likely diagnosis in this patient?", "options": [{"label": "A", "text": "MEN 1 syndrome", "correct": false}, {"label": "B", "text": "MEN 2 A syndrome", "correct": true}, {"label": "C", "text": "MEN 2 B syndrome", "correct": false}, {"label": "D", "text": "Neurofibromatosis type 1", "correct": false}], "correct_answer": "B. MEN 2 A syndrome", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MEN 2 A syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MEN 2 B syndrome</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Autosomal dominant</li>\n<li>Germline gain of function RET protocogene mutation</li>\n<li>Also known as Sipple syndrome</li>\n<li>Gene of MEN2A located on Chromosome 10- <span class=\"customMeta\" data-dictid=\"dabfa103741692777185dac756c49b\">cysteine</span> codon</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Autosomal dominant</li>\n<li>Germline gain of function RET protocogene mutation</li>\n<li>Also known as Gorlin syndrome</li>\n<li>Gene of MEN2B located on Chromosome 10- TyrKinase</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (M/C)</li>\n<li>Pheochromocytoma</li>\n<li>Primary hyperparathyroidism</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinoma</li>\n<li>Pheochromocytoma</li>\n<li>Neuroma’s (skin, mucosa, eyes)</li>\n<li>Marfanoid habitus</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Identify the gene commonly involved in the carcinoma shown in the image below:", "options": [{"label": "A", "text": "RAS", "correct": false}, {"label": "B", "text": "RET", "correct": false}, {"label": "C", "text": "BRAF V600", "correct": true}, {"label": "D", "text": "P53", "correct": false}], "correct_answer": "C. BRAF V600", "question_images": ["https://image.prepladder.com/content/pZsT6MVPe1J5vA2rxZZp1724849727.png"], "explanation_images": [], "explanation": "<p>Correct Option C - BRAF V6\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with headaches, palpitations, and hypertension. On laboratory examination, urine VMA is positive. His biopsy findings are given below. Which of the following is a correct statement?", "options": [{"label": "A", "text": "Mostly malignant", "correct": false}, {"label": "B", "text": "Mostly in children", "correct": false}, {"label": "C", "text": "Mostly bilateral", "correct": false}, {"label": "D", "text": "Associated with MEN2A", "correct": true}], "correct_answer": "D. Associated with MEN2A", "question_images": ["https://image.prepladder.com/content/7HAe7cyzygGAEYUUFyBi1724852454.png"], "explanation_images": [], "explanation": "<p>Correct Option D - Associated with MEN2A\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which hormone is secreted by the structure marked with an arrow?", "options": [{"label": "A", "text": "Glucocorticoid", "correct": true}, {"label": "B", "text": "DHEA", "correct": false}, {"label": "C", "text": "Androgens", "correct": false}, {"label": "D", "text": "Mineralocorticoid", "correct": false}], "correct_answer": "A. Glucocorticoid", "question_images": ["https://image.prepladder.com/notes/XUZE5QwbIdTTZvmQj8rR1747650950.png"], "explanation_images": ["https://image.prepladder.com/content/dWq3B3d1eMUXwno1t2H31747311407.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:623px\">\n<tbody>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\"><strong>Layers of Adrenal Gland</strong></td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Adrenal Cortex</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Zones of the cortex</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hormones produced</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Main function</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Morphology of Zone</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Zona Glomerulosa </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Mineralocorticoid <strong>(Option D ruled out)</strong></p>\n<ul>\n<li>Aldosterone(main)</li>\n<li>Deoxycorticosterone</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Maintenance of sodium balance</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Small clumps of cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Zona fasciculata </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Glucocorticoids <strong>(Option A)</strong></p>\n<ul>\n<li>Cortisol</li>\n<li>Corticosterone</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Maintenance of sugars</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Columnar cells that <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> long cords</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Zona reticularis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sex steroids</p>\n<ul>\n<li>Dehydroepiandrosterone (DHEA) <strong>(Option B ruled out)</strong></li>\n<li>Androstenedione <strong>(Option C ruled out)</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Maintenance of sexual functioning</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Network of <span class=\"customMeta\" data-dictid=\"cfd35769b016927771901681bcc115\">intercalated</span> cells</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Adrenal medulla</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Medulla</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Catecholamines:</p>\n<ul>\n<li>Norepinephrine</li>\n<li>Epinephrine</li>\n<li>Small amounts of dopamine</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Carbohydrate and fat metabolisms</li>\n<li>Fight or flight responses</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Specialised <span class=\"customMeta\" data-dictid=\"5731c5431416927771999e54e2563b\">sympathetic</span> ganglion</p>\n<p>Clumps and strands of <span class=\"customMeta\" data-dictid=\"6c4e8893871692777184b46d3381f5\">chromaffin</span> cells</p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a new intranuclear immunohistochemistry marker for neuroendocrine tumors?", "options": [{"label": "A", "text": "Synaptophysin", "correct": false}, {"label": "B", "text": "Chromogranin", "correct": false}, {"label": "C", "text": "INSM", "correct": true}, {"label": "D", "text": "NCAM1/ CD56", "correct": false}], "correct_answer": "C. INSM", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C – INSM\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with neck swelling with compression of the trachea and esophagus. Histopathological assessment shows cell nest and pink extracellular amyloid stroma. What is the origin of the tumor?", "options": [{"label": "A", "text": "Parafollicular C cells", "correct": true}, {"label": "B", "text": "Hurthle cell", "correct": false}, {"label": "C", "text": "Follicular cells", "correct": false}, {"label": "D", "text": "Askanazy cells", "correct": false}], "correct_answer": "A. Parafollicular C cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/1YxooIqymHH95ZRVYHSQ1718363497.png"], "explanation": "<p>Correct Option A - Parafollicular C\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 26-year-old female patient presents with a palpable thyroid nodule and occasional neck discomfort. She has no history of radiation exposure to the neck. On physical examination, a solitary, firm, non-tender thyroid nodule is noted. Ultrasound reveals a hypoechoic nodule with microcalcifications. Fine-needle aspiration biopsy is performed, and histological analysis reveals characteristic nuclear changes. What is the most common thyroid cancer in this patient?", "options": [{"label": "A", "text": "Papillary carcinoma", "correct": true}, {"label": "B", "text": "Follicular carcinoma", "correct": false}, {"label": "C", "text": "Medullary carcinoma", "correct": false}, {"label": "D", "text": "Anaplastic carcinoma", "correct": false}], "correct_answer": "A. Papillary carcinoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - P\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 19-year-old female presents with a neck swelling that shifts during swallowing. Ultrasound reveals a 2 cm x 2 cm mass in the left lobe of the thyroid, reaching the strap muscles. Histopathology shows findings as shown in the image. What is the most probable diagnosis?", "options": [{"label": "A", "text": "Medullary CA thyroid", "correct": false}, {"label": "B", "text": "Follicular CA thyroid", "correct": false}, {"label": "C", "text": "Thyroglossal cyst", "correct": false}, {"label": "D", "text": "Papillary CA thyroid", "correct": true}], "correct_answer": "D. Papillary CA thyroid", "question_images": ["https://image.prepladder.com/notes/5HTbNPe7Qy5XSTAGVFNR1745256514.png"], "explanation_images": ["https://image.prepladder.com/notes/tSpOdmhOGyplk36Pb0es1745256773.png", "https://image.prepladder.com/notes/OWOWmVAQdCk8lbAaGLdn1745256837.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the likely diagnosis for a patient who presents with a swelling in the midline of the neck, based on the biopsy findings, which reveal orphan Annie's eye nuclei as depicted in the image provided?", "options": [{"label": "A", "text": "Follicular carcinoma", "correct": false}, {"label": "B", "text": "Papillary carcinoma", "correct": true}, {"label": "C", "text": "Toxic nodular goiter", "correct": false}, {"label": "D", "text": "Medullary carcinoma", "correct": false}], "correct_answer": "B. Papillary carcinoma", "question_images": ["https://image.prepladder.com/content/xZfbNS3NUCe6Av5EI3VM1746083891.png"], "explanation_images": ["https://image.prepladder.com/content/tmySiIXWGIvGH7epfFAz1746083925.png", "https://image.prepladder.com/content/eu7mbfKr5V5Xltn4ImLz1747908550.png", "https://image.prepladder.com/content/A02sEs0AqYyOLQcUQHnO1746083925.png", "https://image.prepladder.com/content/LTVz2nzcHNtYvrDMd1x31747922252.png", "https://image.prepladder.com/content/Y7wz3urTYRV7HQqLlKCo1746083925.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presented to the OPD with long hands and feet and a protruding lower jaw. Which of the following genes is most likely implicated in this scenario?", "options": [{"label": "A", "text": "GATA1", "correct": false}, {"label": "B", "text": "PIT1", "correct": true}, {"label": "C", "text": "TPIT", "correct": false}, {"label": "D", "text": "SF1", "correct": false}], "correct_answer": "B. PIT1", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the minimum biopsy specimen requirement for an adequate sample in the case of a thyroid biopsy?", "options": [{"label": "A", "text": "15 follicular cell clusters containing 10-12 cells", "correct": false}, {"label": "B", "text": "10 follicular cell clusters containing 6-8 cells", "correct": false}, {"label": "C", "text": "3 follicular cell clusters containing 10-15 cells", "correct": false}, {"label": "D", "text": "6 follicular cell clusters containing 10-15 cells", "correct": true}], "correct_answer": "D. 6 follicular cell clusters containing 10-15 cells", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thy 1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-diagnostic</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thy 1c</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-diagnostic cystic</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thy 2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-neoplastic</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thy 3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Follicular</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thy 4</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Suspicion of malignancy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thy 5</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Malignant</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with a midline swelling in the neck. A biopsy reveals Orphan Annie's eye nuclei, as shown in the image below. What is the diagnosis?", "options": [{"label": "A", "text": "Follicular carcinoma", "correct": false}, {"label": "B", "text": "Papillary carcinoma", "correct": true}, {"label": "C", "text": "Toxic nodular goitre", "correct": false}, {"label": "D", "text": "Medullary carcinoma", "correct": false}], "correct_answer": "B. Papillary carcinoma", "question_images": ["https://image.prepladder.com/content/2aoiM1aBQAnCzMXndGxL1745217730.png"], "explanation_images": ["https://image.prepladder.com/content/60oDEsfgPmsXpR3BrgNs1745217800.png", "https://image.prepladder.com/content/zpM0RvA4N29RggDMuwcq1745217800.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A middle-aged woman presents with thyroid swelling. Blood tests show elevated TSH levels and the presence of thyroid peroxidase antibodies. Histopathological examination revealed the presence of Hurthle cells. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Hashimoto thyroiditis", "correct": true}, {"label": "B", "text": "Graves’ disease", "correct": false}, {"label": "C", "text": "Follicular carcinoma of thyroid", "correct": false}, {"label": "D", "text": "Medullary carcinoma of thyroid", "correct": false}], "correct_answer": "A. Hashimoto thyroiditis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/DHgzeC6cNTunYijv0K3V1745218825.png", "https://image.prepladder.com/notes/yWacePijOKX8LDa4Xzj41746438249.png", "https://image.prepladder.com/notes/RFKMByNhcs3aNqI76L6I1746438359.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the probable diagnosis for a patient who has swelling in the middle of their neck, along with weight loss, and a thyroid biopsy showing the presence of 'Orphan Annie eye nuclei?", "options": [{"label": "A", "text": "Follicular thyroid carcinoma", "correct": false}, {"label": "B", "text": "Papillary thyroid carcinoma", "correct": true}, {"label": "C", "text": "Anaplastic thyroid carcinoma", "correct": false}, {"label": "D", "text": "Medullary thyroid carcinoma", "correct": false}], "correct_answer": "B. Papillary thyroid carcinoma", "question_images": ["https://image.prepladder.com/content/r2TNoSQ0M73dD1G2gzrR1746696791.png"], "explanation_images": ["https://image.prepladder.com/content/Z80HcghGwich1VpKUVIu1746696881.png", "https://image.prepladder.com/content/1664NwS8CXuVVfiBoK271746696890.png", "https://image.prepladder.com/content/C5AIl3l3Nw2tpg3GccD51746696903.png", "https://image.prepladder.com/content/ImAS2IjWtDn1IVgV5uXu1746696913.png", "https://image.prepladder.com/content/iSged9AVaI3Ecgcgl5rV1746696922.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with a painless neck swelling . The histology of the tissue is as given in the image below. What is the diagnosis?", "options": [{"label": "A", "text": "Medullary carcinoma", "correct": false}, {"label": "B", "text": "NHL", "correct": false}, {"label": "C", "text": "Graves disease", "correct": false}, {"label": "D", "text": "Hashimoto’s thyroiditis", "correct": true}], "correct_answer": "D. Hashimoto’s thyroiditis", "question_images": ["https://image.prepladder.com/content/wjYrB5Pdf4YERxyru87k1711958369.png"], "explanation_images": ["https://image.prepladder.com/content/SDzW160sbePHJRYUxufJ1711959140.png", "https://image.prepladder.com/content/VquIvV08xHBhL2gXcSKz1711958663.png", "https://image.prepladder.com/content/PnOZiac9G1Dpn2jslwy21711958912.png", "https://image.prepladder.com/content/wjYrB5Pdf4YERxyru87k1711958369.png", "https://image.prepladder.com/content/SDzW160sbePHJRYUxufJ1711959140.png"], "explanation": "<p>Correct Option D - Hashimoto’s Th\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 34-year-old male comes to the outdoor patient department with complaints of episodic headaches, palpitations, and sweating . On physical examination, his chest shows pectus excavatum and a high extremities-to-body ratio . Growth is seen on her tongue, and a mass on the left flank is also palpated. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "MEN 1", "correct": false}, {"label": "B", "text": "MEN 2A", "correct": false}, {"label": "C", "text": "MEN 2B", "correct": true}, {"label": "D", "text": "Neurofibromatosis type 2", "correct": false}], "correct_answer": "C. MEN 2B", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"e48bb8abfa1692777192e3fa06774f\">MEN</span> 2B\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td> </td>\n<td><strong>MEN 1</strong></td>\n<td><strong>MEN 2A</strong></td>\n<td><strong>MEN 2B</strong></td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>Mode of inheritance</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Autosomal dominant inheritance</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Autosomal dominant inheritance</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Autosomal dominant inheritance</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>Associated gene mutations</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>MEN1 gene mutation</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>RET gene mutation</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>RET gene mutation</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>Endocrine tumors</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Parathyroid adenoma</li>\n<li>Pancreatic <span class=\"customMeta\" data-dictid=\"7eca2476201692777193e0a0959bd7\">neuroendocrine</span> tumors</li>\n<li>Pituitary tumors</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinoma</li>\n<li>Pheochromocytoma</li>\n<li>Parathyroid hyperplasia</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinoma</li>\n<li>Pheochromocytoma</li>\n<li>Marfanoid habitus</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Pheochromocytoma produces all, except:", "options": [{"label": "A", "text": "Nor-epinephrine", "correct": false}, {"label": "B", "text": "Secretin", "correct": true}, {"label": "C", "text": "Vasoactive intestinal polypeptide", "correct": false}, {"label": "D", "text": "Somatostatin", "correct": false}], "correct_answer": "B. Secretin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - S\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 26 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which system is widely used for reporting thyroid cytopathology?", "options": [{"label": "A", "text": "TIRADS", "correct": false}, {"label": "B", "text": "Gleason System", "correct": false}, {"label": "C", "text": "Bethesda System", "correct": true}, {"label": "D", "text": "Duke Classification", "correct": false}], "correct_answer": "C. Bethesda System", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:688px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnostic category</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk of <span class=\"customMeta\" data-dictid=\"0c7efd2b8716927771914c8cb19e54\">malignancy</span> (%)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Usual management</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-diagnostic</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>5-20</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Repeat FNAC with <span class=\"customMeta\" data-dictid=\"df077f2c3d16927772019f8223e58f\">ultrasound</span> guidance</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Benign</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2-7</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinical and <span class=\"customMeta\" data-dictid=\"250ea353d2169277719853a4313f1b\">sonographic</span> follow-up</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Atypia of undetermined significance</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>13-30</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Repeat FNAC, molecular testing, <span class=\"customMeta\" data-dictid=\"552e9ef8811692777186997018b858\">diagnostic</span> lobectomy, or surveillance</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Follicular neoplasm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>23-34</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Molecular testing, <span class=\"customMeta\" data-dictid=\"552e9ef8811692777186997018b858\">diagnostic</span> lobectomy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Suspicious for malignancy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>67-83</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Molecular testing, lobectomy, or near-total thyroidectomy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Malignant</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>97-100</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lobectomy or near-total thyroidectomy</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "You are examining a high-resolution microscopic image of thyroid tissue. Which of the following depicts cells responsible for the secretion of calcitonin?", "options": [{"label": "A", "text": "A", "correct": false}, {"label": "B", "text": "B", "correct": true}, {"label": "C", "text": "C", "correct": false}, {"label": "D", "text": "D", "correct": false}], "correct_answer": "B. B", "question_images": ["https://image.prepladder.com/content/RLENqWCCCzPnHzuIN5w91737648349.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old female presents with fatigue, weight gain, and cold intolerance. On physical examination, she has diffuse goitre and dry skin. Histopathological examination shows lymphoid infiltration, atrophic thyroid follicles lined in many areas by epithelial cells with abundant eosinophilic, granular cytoplasm as shown below. What is the likely diagnosis?", "options": [{"label": "A", "text": "Grave’s disease", "correct": false}, {"label": "B", "text": "Thyroid nodule", "correct": false}, {"label": "C", "text": "Papillary carcinoma", "correct": false}, {"label": "D", "text": "Hashimoto thyroiditis", "correct": true}], "correct_answer": "D. Hashimoto thyroiditis", "question_images": ["https://image.prepladder.com/content/TakzYugrf48PKtcJAPz81737648666.png"], "explanation_images": ["https://image.prepladder.com/content/zDdgS6nBz37rG0HAIRKY1737648632.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/e94Ecg2pNJlGvXQz02q81747818824.mp3", "video": ""}, {"text": "Which of the following antibodies are elevated in a patient of Hashimoto's thyroiditis?", "options": [{"label": "A", "text": "Thyroid-stimulating immunoglobulins (TSI)", "correct": false}, {"label": "B", "text": "Anti-thyroid peroxidase antibodies (Anti-TPO)", "correct": true}, {"label": "C", "text": "Anti-thyroid stimulating hormone receptor antibodies (Anti-TSHR)", "correct": false}, {"label": "D", "text": "Anti-thyroid hormone antibodies (Anti-T3/T4)", "correct": false}], "correct_answer": "B. Anti-thyroid peroxidase antibodies (Anti-TPO)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 29-year-old lady has been experiencing loss of appetite, profuse sweating, and palpitations for the past three months. Laboratory tests conclude increased T3 and T4 levels with decreased TSH levels. A representative HPE of this condition is shown below. The most common antibodies in this condition target which of the following?", "options": [{"label": "A", "text": "TSH receptor", "correct": true}, {"label": "B", "text": "Thyroid peroxidase", "correct": false}, {"label": "C", "text": "Thyroglobulin", "correct": false}, {"label": "D", "text": "Dermal fibroblasts", "correct": false}], "correct_answer": "A. TSH receptor", "question_images": ["https://image.prepladder.com/content/ves93AJTU1oJOSgRArhe1737648844.png"], "explanation_images": ["https://image.prepladder.com/content/AUMVGJsxvcoKxCnD6L5M1736909746.png", "https://image.prepladder.com/content/BUsDbUwkVUuce6FAppSv1737648801.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old woman comes to the office due to progressively worsening eye irritation and double vision over the last two months. She also reports unintentional weight loss, mood swings, diarrhoea, and palpitations. Physical examination shows tachycardia and bilateral proptosis. What is the pathophysiology causing proptosis?", "options": [{"label": "A", "text": "Increased activity of orbital fibroblasts", "correct": true}, {"label": "B", "text": "Increased breakdown of hyaluronic acid", "correct": false}, {"label": "C", "text": "Increased synthesis of thyroid hormones", "correct": false}, {"label": "D", "text": "Increase in sympathetic activity", "correct": false}], "correct_answer": "A. Increased activity of orbital fibroblasts", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following best describes the gross morphology of Riedel’s thyroiditis?", "options": [{"label": "A", "text": "Localised nodule within the gland", "correct": false}, {"label": "B", "text": "Diffusely enlarged thyroid gland", "correct": false}, {"label": "C", "text": "Mobile and well-circumcised mass", "correct": false}, {"label": "D", "text": "Stony and hard consistency", "correct": true}], "correct_answer": "D. Stony and hard consistency", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a feature of subacute lymphocytic thyroiditis?", "options": [{"label": "A", "text": "Also called postpartum thyroiditis", "correct": false}, {"label": "B", "text": "Usually presents as a painful enlargement of the thyroid", "correct": true}, {"label": "C", "text": "Self-limiting condition", "correct": false}, {"label": "D", "text": "Lymphocytic inflammation in the thyroid", "correct": false}], "correct_answer": "B. Usually presents as a painful enlargement of the thyroid", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the finding in the histopathological examination of a biopsy specimen from a patient with De Quervain Thyroiditis?", "options": [{"label": "A", "text": "Extensive stromal fibrosis extending beyond the thyroid capsule", "correct": false}, {"label": "B", "text": "Follicular hyperplasia with scalloping colloid", "correct": false}, {"label": "C", "text": "Mononuclear infiltration with well-developed germinal centres", "correct": false}, {"label": "D", "text": "Mixed cellular infiltration with occasional multinucleated giant cells", "correct": true}], "correct_answer": "D. Mixed cellular infiltration with occasional multinucleated giant cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ovW2RVtu8Yu4wPiAWyl61736910129.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old patient presents with a solitary thyroid nodule. The patient also reports difficulty swallowing, with no complaints of weight loss, fatigue, or heat intolerance. An excisional biopsy reveals &gt;75% of the following characteristic cells. Which genetic mutation is most commonly associated with this type of thyroid tumour?", "options": [{"label": "A", "text": "BRAF", "correct": false}, {"label": "B", "text": "GNAS", "correct": false}, {"label": "C", "text": "RAS", "correct": true}, {"label": "D", "text": "PTEN", "correct": false}], "correct_answer": "C. RAS", "question_images": ["https://image.prepladder.com/content/U3EnhIsnSi1HEQywquYW1737649171.png"], "explanation_images": ["https://image.prepladder.com/content/f8myyNv4DtIzPOiwNnTF1737649160.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:652px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Thyroid Malignancy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Mutations/Genetic Alterations</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Follicular <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> Adenoma</p>\n<p>(<em><u>Benign</u></em> Condition)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>RAS</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Papillary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (PTC)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>BRAF V600E</li>\n<li>RET/PTC rearrangements</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Follicular <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (FTC)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>RAS</li>\n<li>PAX8-PPARγ rearrangements</li>\n<li>PIK3CA</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (MTC)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>RET</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Anaplastic <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (ATC)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>TP53</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match each type of thyroid tumour with its most commonly associated risk factor: Thyroid Carcinoma Risk Factors: 1. Papillary thyroid carcinoma A. Iodine deficiency 2. Follicular thyroid carcinoma B. RET proto-oncogene mutations 3. Medullary thyroid carcinoma C. Radiation exposure 4. Anaplastic thyroid carcinoma D. History of a well-differentiated follicular neoplasm", "options": [{"label": "A", "text": "1-C, 2-A, 3-B, 4-D", "correct": true}, {"label": "B", "text": "1-B, 2-C, 3-D, 4-A", "correct": false}, {"label": "C", "text": "1-A, 2-D, 3-C, 4-B", "correct": false}, {"label": "D", "text": "1-D, 2-B, 3-A, 4-C", "correct": false}], "correct_answer": "A. 1-C, 2-A, 3-B, 4-D", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:637px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Thyroid Cancer Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Risk Factors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Papillary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Radiation exposure (especially in childhood)</li>\n<li>Family history of <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> cancer</li>\n<li>Hashimoto thyroiditis</li>\n<li>Thyroglossal cyst</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Follicular <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Iodine deficiency</li>\n<li>Long-standing Goiter.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>RET <span class=\"customMeta\" data-dictid=\"07aa4138b11692777196389334280a\">proto-oncogene</span> mutations.</li>\n<li>Family history (e.g., MEN2 syndrome)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Anaplastic <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">Thyroid</span> Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Older age</li>\n<li>¼ th of patients have a past history of a well-differentiated <span class=\"customMeta\" data-dictid=\"031a38f17a16927772036476ede2ae\">follicular</span> neoplasm</li>\n<li>Previous radiation exposure</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/rmlQ8iJL9xtn4Zytm9S01746478150.mp3", "video": ""}, {"text": "A 40-year-old patient presents with a nodule in the anterior neck and lymphadenopathy. The tumour is found to have spread to the lymphatics. Histopathological examination shows characteristic findings. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Follicular thyroid carcinoma", "correct": false}, {"label": "B", "text": "Medullary thyroid carcinoma", "correct": false}, {"label": "C", "text": "Papillary thyroid carcinoma", "correct": true}, {"label": "D", "text": "Anaplastic thyroid carcinoma", "correct": false}], "correct_answer": "C. Papillary thyroid carcinoma", "question_images": ["https://image.prepladder.com/content/wmEoeVsTwSzgKKbSCsxr1737649369.png", "https://image.prepladder.com/content/MYE45Omjld2YH9hxDgow1737649414.png"], "explanation_images": ["https://image.prepladder.com/content/c6IRoZ9xoz4KADhFFOoz1737649355.png", "https://image.prepladder.com/content/3Tn0ruHdiINWzqUjWBnJ1737649390.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a common feature of follicular carcinoma of thyroid?", "options": [{"label": "A", "text": "Second most common thyroid malignancy", "correct": false}, {"label": "B", "text": "Has a Hurthle cell variant", "correct": false}, {"label": "C", "text": "Commonly spreads by lymphatic route", "correct": true}, {"label": "D", "text": "FNAC is not helpful in diagnosis", "correct": false}], "correct_answer": "C. Commonly spreads by lymphatic route", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient presents with a painless lump on the front of the neck, bone pain, fatigue, and episodes of flushed skin. Genetic studies reveal a mutation in the RET gene. Which type of amyloid is typically deposited in this condition?", "options": [{"label": "A", "text": "A-β", "correct": false}, {"label": "B", "text": "A-CAL", "correct": true}, {"label": "C", "text": "A-L", "correct": false}, {"label": "D", "text": "A-TTR", "correct": false}], "correct_answer": "B. A-CAL", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following statements regarding the layers of the digestive tract is incorrect?", "options": [{"label": "A", "text": "The mucosa is the first layer of the digestive tract.", "correct": false}, {"label": "B", "text": "The submucosa is absent in the gallbladder.", "correct": false}, {"label": "C", "text": "The muscularis propria is present throughout the GIT.", "correct": false}, {"label": "D", "text": "The esophagus lacks the submucosal layer.", "correct": true}], "correct_answer": "D. The esophagus lacks the submucosal layer.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/v3jhIqAXfd4IN9hiUgJE1737608346.png", "https://image.prepladder.com/content/LLiqTYlRM5c09K3btItf1737608360.png"], "explanation": "<p>Correct Answer:D) The <span class=\"customMeta\" data-dictid=\"6a729a105a169277718788389dbeab\">esophagus</span> lacks the <span class=\"customMeta\" data-dictid=\"7cb424e4921692777199f9951be2ce\">submucosal</span> layer</p>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:672px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Layer</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mucosa</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Innermost Layer</strong> (Option A)</p>\n<ul>\n<li>Mucous Membrane</li>\n<li>Lamina Propria</li>\n<li>Muscularis Mucosa</li>\n</ul>\n<p><strong>Lining <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">Epithelium</span> (Varies by Region)</strong></p>\n<ul>\n<li>Esophagus: Nonkeratinized <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">Squamous</span> Epithelium</li>\n<li>Stomach: Simple Columnar Epithelium</li>\n<li>Intestine: Simple <span class=\"customMeta\" data-dictid=\"8ff554096316927771851cc310435e\">Columnar Epithelium</span> with Brush Border</li>\n<li>Anal Canal:\n\t\t\t\t<ul>\n<li>Columnar <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">Epithelium</span> above <span class=\"customMeta\" data-dictid=\"6f87bfc5af1692777195908802d86b\">Pectinate</span> Line</li>\n<li>Stratified <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">Squamous</span> <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">Epithelium</span> below <span class=\"customMeta\" data-dictid=\"6f87bfc5af1692777195908802d86b\">Pectinate</span> Line</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Submucosa</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Contains: <strong>Nerves (Meissner's Plexus)</strong></p>\n<p>Absent in <span class=\"customMeta\" data-dictid=\"1f51bf91811692777188d929c8e851\">Gallbladder</span> (Mucosa directly supported by <span class=\"customMeta\" data-dictid=\"67e237a57c16927771859803f93ab3\">Connective</span> Tissue) (Option B)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Muscularis Propria</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Responsible for Peristaltic Movements (Propels Food from <span class=\"customMeta\" data-dictid=\"6a729a105a169277718788389dbeab\">Esophagus</span> to Anal Canal)</li>\n<li>Contains Myenteric Nerve Plexus</li>\n<li>Present throughout the GI <span class=\"customMeta\" data-dictid=\"1a1307223f16927772017a994bfc39\">tract</span> (Option C)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serosa</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Outer Protective <span class=\"customMeta\" data-dictid=\"44e9c0bbec169277719829907370ee\">Sheath</span> (Most of Intestine)</strong></p>\n<ul>\n<li>It is the visceral peritoneum, as <span class=\"customMeta\" data-dictid=\"f0c783c43716927771956acc242b90\">peritoneum</span> is absent in the <span class=\"customMeta\" data-dictid=\"3c6021096816927772007954fcc158\">thoracic</span> cavity, hence the <span class=\"customMeta\" data-dictid=\"6a729a105a169277718788389dbeab\">esophagus</span> is covered by adventitia. (Option D)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old male presents with chronic heartburn and regurgitation. Upper endoscopy reveals the presence of Barrett's esophagus. What is the primary cellular change seen in this condition?", "options": [{"label": "A", "text": "Metaplasia of squamous epithelium", "correct": true}, {"label": "B", "text": "Dysplasia of squamous epithelium", "correct": false}, {"label": "C", "text": "Hyperplasia of columnar epithelium", "correct": false}, {"label": "D", "text": "Hypertrophy of columnar epithelium", "correct": false}], "correct_answer": "A. Metaplasia of squamous epithelium", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/9jpLCq1rlfmBFFrU95Ga1736862271.png", "https://image.prepladder.com/notes/TOe2owIh7kV0sRLoGkIM1736862565.png", "https://image.prepladder.com/notes/sPQOvc3pZHlNejN8yvbg1736862659.png"], "explanation": "<p>Correct Answer:A) \n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old male presents with chronic heartburn for two years. An endoscopy is performed, and the biopsy of the esophageal specimen stained with special stain is shown below. Which of the following conditions is the patient at an increased risk of?", "options": [{"label": "A", "text": "Squamous cell carcinoma", "correct": false}, {"label": "B", "text": "Adenocarcinoma", "correct": true}, {"label": "C", "text": "Plummer Vinson syndrome", "correct": false}, {"label": "D", "text": "MALToma", "correct": false}], "correct_answer": "B. Adenocarcinoma", "question_images": ["https://image.prepladder.com/notes/YGEAsYFMq2FlUUqElS011736863147.png"], "explanation_images": ["https://image.prepladder.com/content/8wMF0jG1RrACFpOeloiC1737608752.png"], "explanation": "<p>Correct Answer:B) \n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A woman presented with dysphagia to solids for a month. On examination, there are multiple lesions on the lips. An endoscopy reveals obstructive lesions in the upper oesophagus. Which of the following additional findings can be seen in this patient?", "options": [{"label": "A", "text": "Development of GI polyps", "correct": false}, {"label": "B", "text": "Degeneration of nitric oxide–producing neurons", "correct": false}, {"label": "C", "text": "Iron deficiency anemia", "correct": true}, {"label": "D", "text": "Apple core appearance on imaging", "correct": false}], "correct_answer": "C. Iron deficiency anemia", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/SWkJIxoAaNfxxwPXF2Pf1743335797.png", "https://image.prepladder.com/notes/wgF9XrrBw0tnbDMwpEfa1736865567.png", "https://image.prepladder.com/notes/DJfw5YuygY2uxCZA9o0M1736865689.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with complaints of severe odynophagia, retrosternal chest pain, and difficulty in swallowing solids and liquids for the past week. He has a history of untreated HIV infection with a CD4 count of 80 cells/mm³. An upper gastrointestinal endoscopy image is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "CMV esophagitis", "correct": false}, {"label": "B", "text": "HSV esophagitis", "correct": false}, {"label": "C", "text": "Eosinophilic esophagitis", "correct": false}, {"label": "D", "text": "Candida esophagitis", "correct": true}], "correct_answer": "D. Candida esophagitis", "question_images": ["https://image.prepladder.com/notes/t3ohfyc3UoWmVQcj83JH1743428218.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Candida Esophagitis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Herpes Simplex Virus (HSV) <span class=\"customMeta\" data-dictid=\"3d764404051692777187f6ce218779\">Esophagitis</span> (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cytomegalovirus (CMV) <span class=\"customMeta\" data-dictid=\"3d764404051692777187f6ce218779\">Esophagitis</span> (Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Endoscopic finding</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adherent, grey-white pseudomembranes over erythematous mucosa</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Punched-out ulcers</p>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Shallow, linear, or <span class=\"customMeta\" data-dictid=\"7ba18aa5e616927771918a45051a40\">longitudinal</span> ulcerations</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histopathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Fungal Hyphae And</li>\n<li>Inflammatory Cells</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Multinucleated Giant Cells,</li>\n<li>Ground-Glass Nuclei,</li>\n<li>Eosinophilic Inclusions At <span class=\"customMeta\" data-dictid=\"7b4370a0b01692777201a5bc0739c2\">Ulcer</span> Margin</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Owl-Eye Appearance,</li>\n<li>Eosinophilic Intranuclear, And</li>\n<li>Basophilic <span class=\"customMeta\" data-dictid=\"45e0bd1529169277719054d85830ce\">Intracytoplasmic</span> Inclusions</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding the condition shown in the endoscopic image below?", "options": [{"label": "A", "text": "Its cause is primarily infectious.", "correct": false}, {"label": "B", "text": "Characteristic rat tail appearance.", "correct": false}, {"label": "C", "text": "Interleukin 5 has a major role in pathogenesis.", "correct": true}, {"label": "D", "text": "Diagnosed by observing at least ten lymphocytes/HPF.", "correct": false}], "correct_answer": "C. Interleukin 5 has a major role in pathogenesis.", "question_images": ["https://image.prepladder.com/notes/e0khb99o8UF1kIuxIYK41743428394.png"], "explanation_images": ["https://image.prepladder.com/notes/e0khb99o8UF1kIuxIYK41743428394.png", "https://image.prepladder.com/notes/Zfrl9IL4Apk5lF41rQdC1736866884.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Eosinophilic Esophagitis:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Triggered by <strong>allergic reactions</strong> to food or environmental allergens <strong>(Option A)</strong></li>\n<li>Associated with <strong>atopic dermatitis, allergic rhinitis, asthma, and <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> eosinophilia</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathophysiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Interleukin 5</strong> (IL-5) key <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> for <span class=\"customMeta\" data-dictid=\"7eba65a7251692777187eaa3b48258\">eosinophil</span> <span class=\"customMeta\" data-dictid=\"76948f718016927771924774ade7e9\">maturation</span> and activation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical Manifestations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Dysphagia</li>\n<li>Epigastric pain</li>\n<li>Dyspepsia</li>\n<li>Chest pain</li>\n<li>Food impaction</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnostic Criteria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Eosinophils ≥ 15 per high power field (HPF) on HPE <strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Endoscopic Findings:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Stacked <span class=\"customMeta\" data-dictid=\"0919f0017e1692777184ac3748841f\">circular</span> rings (\"feline esophagus\") (<strong>Option C)</strong></li>\n<li>Strictures</li>\n<li>Linear furrows</li>\n</ul>\n<p><img alt=\"Eosinophilic Esophagitis Endoscopic Image\" data-author=\"Samir\" data-hash=\"5495\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Multi_ring_esophagus.jpg\" data-tags=\"\" height=\"500\" src=\"https://image.prepladder.com/notes/e0khb99o8UF1kIuxIYK41743428394.png\" width=\"500\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the correct statement/s regarding carcinoma of the oesophagus SCC is more common in the lower two-thirds of the oesophagus Smoking increases the risk of both SCC and adenocarcinoma H. pylori is associated with a decreased risk of oesophageal adenocarcinoma Adenocarcinoma is the overall most common type SCC is linked to fermented milk- mursik, which contains acetaldehyde", "options": [{"label": "A", "text": "1, 3, 5", "correct": false}, {"label": "B", "text": "2, 3, 5", "correct": true}, {"label": "C", "text": "1, 2, 4", "correct": false}, {"label": "D", "text": "2, 4, 5", "correct": false}], "correct_answer": "B. 2, 3, 5", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/Jy1BCWp0LWHGzG0OesX91736867637.jpg"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:693px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Squamous Cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (SCC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Adenocarcinoma of Esophagus</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Predominant location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Middle two-thirds</strong> of the oesophagus <strong><strong>(Statement 1 ruled out)</strong></strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>The lower third of the oesophagus, near GE junction</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Epidemiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Overall, the<strong> more common type<strong> (Statement 4 ruled out)</strong></strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Increasing due to an increase in GERD</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Risk Factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Smoking, Alcohol</li>\n<li>HPV infection</li>\n<li>Caustic <span class=\"customMeta\" data-dictid=\"192677035a169277718780b4d6dbbb\">esophageal</span> injury,</li>\n<li><strong>Achalasia</strong></li>\n<li>Tylosis</li>\n<li><strong>Plummer-Vinson syndrome</strong></li>\n<li>Diets deficient in fruits or vegetables</li>\n<li>Frequent consumption of very</li>\n</ul>\n<p>Hot beverages.</p>\n<ul>\n<li>Previous <strong>radiation</strong> to the mediastinum</li>\n<li>In Kenya, fermented milk (mursik) containing acetaldehyde</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Chronic <span class=\"customMeta\" data-dictid=\"9f47bfb9a616927771887db45c89c7\">gastroesophageal</span> <span class=\"customMeta\" data-dictid=\"def94cc96d16927771970d1a5cfb71\">reflux</span> disease (GERD)</li>\n<li>Obesity</li>\n<li>Smoking</li>\n<li>Low fruit and vegetable diet</li>\n<li>Scleroderma</li>\n<li>p16 and RB gene mutations</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Protective factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Healthy diet</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>H.pylori- reduces acid, hence reducing GERD.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Precursor Lesion</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Barrett's <span class=\"customMeta\" data-dictid=\"84f4cb0ade16927771940b83eacc37\">oesophagus</span> (metaplasia of <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span> to columnar)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Keratinisation and <span class=\"customMeta\" data-dictid=\"0707c047ba1692777195ce682d9eca\">pearl</span> formation</p>\n<p><img alt=\"Squamous cell <span class=\" custommeta\"=\"\" data-dictid=\"988c19e3131692777183b6744d1920\"/>carcinoma esophagus\" data-author=\"Mikael Haggstrom\" data-hash=\"734\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_squamous-cell_carcinoma.png\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/5Mb90i4lgBnNAveplnQA1736867561.png\" /></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Glandular differentiation</p>\n<p><img alt=\"Adenocarcinoma esophagus\" data-author=\"Mikael Haggstrom\" data-hash=\"735\" data-license=\"CC0 1.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_adenocarcinoma.png\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/Jy1BCWp0LWHGzG0OesX91736867637.jpg\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Clinical Presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Dysphagia, weight loss, chest pain</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Dysphagia, <span class=\"customMeta\" data-dictid=\"01e03927231692777188168edc7b35\">GERD</span> symptoms, weight loss</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Generally less favourable</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Generally more favourable</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/bt8bIwpAJz17fSTZP5gw1745347336.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 17 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "During a routine colonoscopy of a 60-year-old male, a small polyp is identified in the colon. Subsequent biopsy results confirm the presence of a hyperplastic polyp. Which characteristic is typically associated with this condition?", "options": [{"label": "A", "text": "Commonly found in the right colon", "correct": false}, {"label": "B", "text": "Pathogenesis involves increased epithelial cell turnover", "correct": false}, {"label": "C", "text": "Lacks malignant potential", "correct": true}, {"label": "D", "text": "Histologically composed of immature goblet cells", "correct": false}], "correct_answer": "C. Lacks malignant potential", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/k0rT6uCkCJfZzvjxSwEe1736998750.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man undergoes a routine colonoscopy. During the procedure, a polyp is discovered. Histological examination reveals serrated architecture, as shown in the image. Which of the following is true about this polyp?", "options": [{"label": "A", "text": "It has malignant potential", "correct": true}, {"label": "B", "text": "Predominantly found in the left colon", "correct": false}, {"label": "C", "text": "Serrated architecture is limited to the surface of the lesions", "correct": false}, {"label": "D", "text": "Do not require surveillance or follow-up after detection", "correct": false}], "correct_answer": "A. It has malignant potential", "question_images": ["https://image.prepladder.com/notes/6sKRnAjJQnJ4b3aox6Ak1736999191.png"], "explanation_images": ["https://image.prepladder.com/notes/6sKRnAjJQnJ4b3aox6Ak1736999191.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hyperplastic polyp</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sessile serrated polyp</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Piling up of goblet and <span class=\"customMeta\" data-dictid=\"1ecf648f6f1692777180dda8ce250d\">absorptive</span> cells due to decreased epithelial cell <span class=\"customMeta\" data-dictid=\"a13747deff16927772016cfbf6b284\">turnover</span> and delayed shedding</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Due to <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of epithelial cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Predominant site</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Left colon</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Right colon</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HPE</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serrations only in the <strong>upper third of crypt</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serrations throughout the <strong>full length of the glands including <span class=\"customMeta\" data-dictid=\"d2a83e1b4c1692777185c446d81c0c\">crypt</span> base</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Neoplastic potential</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-neoplastic</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neoplastic</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"Hyperplastic <span class=\" custommeta\"=\"\" data-dictid=\"b5c135c2311692777196832953e406\"/>polyp low magnification\" data-author=\"Nephron\" data-hash=\"751\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Hyperplastic_polyp_--_low_mag.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/aNgr3PS0oUNFPEsdTjpc1736999974.png\" />\n\t\t\t<p><strong> Hyperplastic polyp</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><img alt=\"Sessile serrated polyp\" data-author=\"Nephron\" data-hash=\"750\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Sessile_serrated_adenoma_3_intermed_mag.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/6sKRnAjJQnJ4b3aox6Ak1736999191.png\"><strong> </strong></img></p>\n<p><strong> <span class=\"customMeta\" data-dictid=\"3f6a2302971692777198a107e73204\">Sessile</span> serrated polyp</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 4-year-old girl presents to the OPD with complaints of rectal bleeding and abdominal pain for the past six months. Investigations reveal approximately 40 hamartomatous colon polyps. The biopsy shows cystic spaces with dilated glands filled with mucin and inflammatory debris. What is the most likely diagnosis for this patient?", "options": [{"label": "A", "text": "Familial adenomatous polyposis", "correct": false}, {"label": "B", "text": "Adenocarcinoma colon", "correct": false}, {"label": "C", "text": "Juvenile polyposis syndrome", "correct": true}, {"label": "D", "text": "Sessile Serrated Adenoma", "correct": false}], "correct_answer": "C. Juvenile polyposis syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/dOMh4Bqphvtyx99bVLrH1737000207.jpg"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 13-year-old female presents to the OPD due to abdominal pain and blood in stools. On examination, she had pigmented macules on her lips and oral mucosa. Endoscopy reveals multiple large, pedunculated polyps in the small intestine which shows an arborizing pattern of smooth muscle and glands lined by normal epithelium. Which of the following statements is incorrect about this condition? Autosomal dominant disorder Polyps are more common in the colon Increased risk of developing colon, pancreatic, and breast cancers Gain-of-function mutation in STK11 gene", "options": [{"label": "A", "text": "1 and 2", "correct": false}, {"label": "B", "text": "2 and 4", "correct": true}, {"label": "C", "text": "3 and 4", "correct": false}, {"label": "D", "text": "1 and 3", "correct": false}], "correct_answer": "B. 2 and 4", "question_images": ["https://image.prepladder.com/notes/rmsS1SXubZdYVcYYhxzY1737000381.png"], "explanation_images": ["https://image.prepladder.com/notes/lHS24hUgzTcOEUPbvWaZ1737000604.jpg"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/kb752lPYXkqbxMQWfBWQ1747306487.mp3", "video": ""}, {"text": "A 58-year-old female presents with weight loss, nail changes, alopecia, and skin hyperpigmentation. Colonoscopy reveals multiple hamartomatous polyps in the intestine. Family history is negative for intestinal cancers. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Tuberous sclerosis", "correct": false}, {"label": "B", "text": "Bannayan-Ruvalcaba-Riley Syndrome", "correct": false}, {"label": "C", "text": "Cowden syndrome", "correct": false}, {"label": "D", "text": "Cronkhite-Canada Syndrome", "correct": true}], "correct_answer": "D. Cronkhite-Canada Syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old man with a family history of colorectal carcinoma presents with chronic abdominal discomfort and occasional rectal bleeding.Upon further evaluation, a mutation in APC gene is identified leading to a diagnosis of Familial Adenomatous Polyposis. Which of the following statement is true regarding FAP?", "options": [{"label": "A", "text": "Mutation in 6th chromosome", "correct": false}, {"label": "B", "text": "50 % risk of colon cancer if untreated", "correct": false}, {"label": "C", "text": "Presence of a minimum of 100 polyps", "correct": true}, {"label": "D", "text": "Congenital atrophy of the retinal pigment epithelium", "correct": false}], "correct_answer": "C. Presence of a minimum of 100 polyps", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/cnFJNiJKq070wrJZysVq1737000933.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old woman presents with a history of unexplained weight loss along with multiple sebaceous cysts on her face and scalp. She has a family history of colorectal cancer. Upon further examination, she is found to have a bony lesion on her jaw. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Turcot syndrome", "correct": false}, {"label": "B", "text": "Gardner syndrome", "correct": true}, {"label": "C", "text": "Lynch syndrome", "correct": false}, {"label": "D", "text": "MUTYH Associated Polyposis (MAP)", "correct": false}], "correct_answer": "B. Gardner syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/9UNweyF5PilA4IAmJOgv1737001504.png"], "explanation": "<p>Correct Answer:B) \n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6 cm polyp is identified in the descending colon during a routine colonoscopy. Histological examination reveals villous architecture with high-grade dysplasia. Based on this scenario, which factors most strongly correlate with the risk of malignancy in colorectal adenomas?", "options": [{"label": "A", "text": "Presence of villous architecture", "correct": false}, {"label": "B", "text": "Size of the adenoma", "correct": true}, {"label": "C", "text": "Histologic grade of dysplasia", "correct": false}, {"label": "D", "text": "Location within the gastrointestinal tract", "correct": false}], "correct_answer": "B. Size of the adenoma", "question_images": [], "explanation_images": [], "explanation": "<p><strong>References:</strong></p>\n<ul><li>↳ Gastrointestinal tract location</li><li>↳ (Option D)</li><li>↳ :</li></u\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient underwent genetic testing after being diagnosed with colon cancer. Testing reveals a mutation associated with Hereditary Nonpolyposis Colorectal Cancer (HNPCC). Which of the following genes is defective in this patient?", "options": [{"label": "A", "text": "SMAD4, BMPR1", "correct": false}, {"label": "B", "text": "STK11", "correct": false}, {"label": "C", "text": "APC, MUTYH", "correct": false}, {"label": "D", "text": "MLH1, MSH2", "correct": true}], "correct_answer": "D. MLH1, MSH2", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Genes mutation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Manifestation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MLH1, MSH2 (Option D)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Results in <span class=\"customMeta\" data-dictid=\"20b150babc1692777192cc2f5fe1e3\">microsatellite</span> instability</p>\n<p>Causes cluster of cancer: Colorectal, Endometrial, Ovarian, Pancreatic cancers</p>\n<p>Colon cancer develops at a young age and it usually occurs in the right side</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>SMAD4 and BMPR1</p>\n<p>(Option A)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Juvenile <span class=\"customMeta\" data-dictid=\"fe6b8df2fa1692777196938c42762a\">polyposis</span> syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>STK11 (Option B)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peutz-Jeghers syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>APC gene (Option C)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Familial <span class=\"customMeta\" data-dictid=\"bf1f32fbd81692777180c0d2485ab2\">Adenomatous</span> Polyposis(FAP), <span class=\"customMeta\" data-dictid=\"a325d0c14e16927771992fe8a96758\">sporadic</span> <span class=\"customMeta\" data-dictid=\"0fce15e71f1692777184feb9af5303\">colon</span> cancer, <span class=\"customMeta\" data-dictid=\"19a263793116927771888661f5a936\">Gardner syndrome</span> and Turcot syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MUTYH (Option C)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MUTYH-associated polyposis.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/HKdJSCFISxxTbGBqIY5t1746452633.mp3", "video": ""}, {"text": "A 55-year-old male presents to the clinic with complaints of recurrent abdominal discomfort and changes in bowel habits over the past few months. Further investigation with colonoscopy confirmed the presence of adenocarcinoma. Which of the following factors is most closely associated with this condition?", "options": [{"label": "A", "text": "Use of aspirin", "correct": false}, {"label": "B", "text": "Estrogen replacement therapy", "correct": false}, {"label": "C", "text": "High intake of unabsorbable vegetable fiber", "correct": false}, {"label": "D", "text": "High consumption of red meat", "correct": true}], "correct_answer": "D. High consumption of red meat", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:667px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Factors increasing the risk</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Factors decreasing the risk</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Low fiber, high fat diet</li>\n<li>High <span class=\"customMeta\" data-dictid=\"6cdcd39cf2169277719068e247e38d\">intake</span> of red meat and processed meat</li>\n<li>Increased <span class=\"customMeta\" data-dictid=\"5f526a682c16927771831cac5b3711\">calorie</span> <span class=\"customMeta\" data-dictid=\"6cdcd39cf2169277719068e247e38d\">intake</span> and obesity</li>\n<li>F<a href=\"https://www.cdc.gov/genomics/famhistory/\">amily history</a> of <span class=\"customMeta\" data-dictid=\"0fce15e71f1692777184feb9af5303\">colon</span> cancer</li>\n<li>Personal history of adenomas</li>\n<li>Smoking and alcohol</li>\n<li>Inflammatory <span class=\"customMeta\" data-dictid=\"37863e7aec169277718310f33c6a11\">bowel</span> disease</li>\n<li>Lynch syndrome</li>\n<li>FAP</li>\n<li>Acromegaly</li>\n<li>Pelvis irradiation</li>\n<li>Streptococcus bovis septicemia</li>\n<li>Ureterosigmoidoscopy</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>High fiber diet</li>\n<li>Intake of fish (omega-3 <span class=\"customMeta\" data-dictid=\"bc6cd9a9f9169277720261812ea113\">fatty</span> acids), fruits and vegetables (Vit A, C, E)</li>\n<li>NSAID use, particularly Aspirin</li>\n<li>Folic acid</li>\n<li>Calcium</li>\n<li>Hormone replacement therapy</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old female presents with abdominal pain, changes in bowel habits, unintended weight loss. A previous colonoscopy showed a polyp, but a recent one confirmed colorectal adenocarcinoma. Which gene mutations are characteristically associated with development of colorectal adenocarcinoma?", "options": [{"label": "A", "text": "APC, KRAS, SMAD2, and MLH1", "correct": false}, {"label": "B", "text": "TP53, BRAF, TGFBR2, and BAX", "correct": false}, {"label": "C", "text": "APC, KRAS, SMAD4 and TP53", "correct": true}, {"label": "D", "text": "APC, KRAS, TP53, and MYC", "correct": false}], "correct_answer": "C. APC, KRAS, SMAD4 and TP53", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genes </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Function/ association </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>BRAF</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less common; involved in <span class=\"customMeta\" data-dictid=\"b47bc310681692777191d57afcc413\">MAPK</span> pathway</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TGFBR2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less common; part of the TGF-β signalling pathway</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MYC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less common; involved in cell proliferation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MLH1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DNA <span class=\"customMeta\" data-dictid=\"d949802d90169277719238da3d8f63\">mismatch repair</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> leads to MSI</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>BAX</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less common pro-apoptotic protein</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presents with abdominal pain, changes in bowel habits, and weight loss. Her mother and aunt were diagnosed with endometrial and ovarian cancer in their 50s. A colonoscopy and a biopsy confirm well-differentiated adenocarcinoma. Which genetic pathway is most likely associated with adenocarcinoma in this patient?", "options": [{"label": "A", "text": "APC/β-catenin pathway", "correct": false}, {"label": "B", "text": "TGF-β signaling pathway", "correct": false}, {"label": "C", "text": "DNA mismatch repair pathway", "correct": true}, {"label": "D", "text": "BAX pathway", "correct": false}], "correct_answer": "C. DNA mismatch repair pathway", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/u4xw5lBon8wJqVfISoup1737002237.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most common site of metastasis for colon adenocarcinoma?", "options": [{"label": "A", "text": "Brain", "correct": false}, {"label": "B", "text": "Lungs", "correct": false}, {"label": "C", "text": "Bones", "correct": false}, {"label": "D", "text": "Liver", "correct": true}], "correct_answer": "D. Liver", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old male presents with abdominal pain, altered bowel habits and 5kg weight loss in one month. A barium enema study showed the following finding. Which of the following statements is true about the patient's condition?", "options": [{"label": "A", "text": "Presents asweakness due to iron deficiency anemia", "correct": false}, {"label": "B", "text": "Leads to a napkin-ring constriction and luminal narrowing", "correct": true}, {"label": "C", "text": "Growth tends to be polypoidal (growth is into the wall of the intestine?)", "correct": false}, {"label": "D", "text": "HPE commonly shows signet-ring cells", "correct": false}], "correct_answer": "B. Leads to a napkin-ring constriction and luminal narrowing", "question_images": ["https://image.prepladder.com/notes/Y4KL6GMa2HZOrFAypvjc1743430181.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:668px\">\n<tbody>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Proximal adenocarcinoma</p>\n<p>(masses on the <span class=\"customMeta\" data-dictid=\"603036123f1692777183f87e582e3e\">caecum</span> and <span class=\"customMeta\" data-dictid=\"62f0d7c8491692777182ab7cc82edb\">ascending</span> colon)</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Grow as polypoidal and <span class=\"customMeta\" data-dictid=\"a6b9f7eebc16927771871910d2eb87\">exophytic</span> masses which extend along one wall. (Option C)</li>\n<li>Present with <span class=\"customMeta\" data-dictid=\"c8d9b6cbbb1692777194c4bc31f01f\">occult</span> anemia, causing late-stage weakness. (Option A)</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Distal Adenocarcinoma</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Equally distributed along the colon.</li>\n<li>Lesions are annular, causing napkin-ring constrictions and <span class=\"customMeta\" data-dictid=\"fbb10919e516927771917a9afcb633\">luminal</span> narrowing.(Option B)</li>\n<li>Barium study - apple core appearance</li>\n<li>Present early with changes in <span class=\"customMeta\" data-dictid=\"37863e7aec169277718310f33c6a11\">bowel</span> habits, Hematochezia, cramping, left lower <span class=\"customMeta\" data-dictid=\"3a757d7c1216927771968223be411d\">quadrant</span> pain.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 47-year-old male presents with chronic diarrhoea, unintentional weight loss, joint pain, pallor, and generalised weakness. Upper GI endoscopy and biopsy revealed characteristic histopathological findings suggestive of Whipple's disease. Which of the following histopathological features would have led to the diagnosis?", "options": [{"label": "A", "text": "Foamy macrophages filled with PAS-positive granules", "correct": true}, {"label": "B", "text": "Villous atrophy and blunting of the small intestinal mucosa", "correct": false}, {"label": "C", "text": "Lymphoplasmacytic infiltrate in the lamina propria", "correct": false}, {"label": "D", "text": "Presence of caseating granulomas and acid-fast bacilli", "correct": false}], "correct_answer": "A. Foamy macrophages filled with PAS-positive granules", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/P2mXtPdSBhgrSQRGeg3A1737003734.jpg"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Feature</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Explanation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Pathogen</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Tropheryma whipplei (actinomycete)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Symptoms</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Diarrhoea (due to impaired <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> drainage), weight loss, and arthralgia.</li>\n<li>Others: arthritis, fever, lymphadenopathy, neurologic, cardiac, or <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">pulmonary</span> involvement</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Histology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Characterised by foamy macrophages in the small intestinal <span class=\"customMeta\" data-dictid=\"9864ad42b21692777191febeee1002\">lamina</span> propria, which contain <span class=\"customMeta\" data-dictid=\"53ddc0755c1692777195e8d5f9fc68\">periodic</span> acid Schiff (PAS)-positive and diastase-resistant granules, representing partially digested bacteria within lysosomes</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old female presents with chronic diarrhoea, abdominal bloating, and unintended weight loss. She reports discomfort after consuming gluten-containing foods. Laboratory tests show elevated tissue transglutaminase (tTG) and anti-endomysial antibodies (EMA) levels, prompting a small intestinal biopsy via upper endoscopy. Which of the following combinations of histopathological features will be seen in this condition? Intraepithelial CD8+ T Lymphocytes Crypt hyperplasia Villous atrophy Decreased mitotic activity Inflammatory cell infiltration in lamina propria", "options": [{"label": "A", "text": "1, 2, 3", "correct": false}, {"label": "B", "text": "1, 2, 3, 4", "correct": false}, {"label": "C", "text": "2, 4, 5", "correct": false}, {"label": "D", "text": "1, 2, 3, 5", "correct": true}], "correct_answer": "D. 1, 2, 3, 5", "question_images": ["https://image.prepladder.com/notes/gmKzOGKSdadMgZTAPsgK1743430961.png"], "explanation_images": ["https://image.prepladder.com/notes/477QOMFPs6D4gdnVNs4w1737004343.jpg"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Definition</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autoimmune disorder <span class=\"customMeta\" data-dictid=\"3978e9614f1692777200abbe4cfa34\">triggered</span> by ingesting gluten-containing foods in genetically <span class=\"customMeta\" data-dictid=\"55691242bb1692777199360f64cb67\">susceptible</span> individuals.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Synonym</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gluten-sensitive enteropathy</li>\n<li>Celiac sprue</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Diagnosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Biopsy of the second part of the <span class=\"customMeta\" data-dictid=\"280e59e9331692777186f3beac2c41\">duodenum</span> or <span class=\"customMeta\" data-dictid=\"bdbac654081692777196f9aab116f0\">proximal</span> jejunum</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Serum markers</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anti-tissue <span class=\"customMeta\" data-dictid=\"4a47b71b801692777200d06df00a08\">transglutaminase</span> (tTG)-most sensitive</li>\n<li>Anti-endomysial antibodies (EMA)-most specific</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Histology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Increased <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> CD8+ <span class=\"customMeta\" data-dictid=\"9f1d97eb2b1692777200b3926afd54\">T lymphocytes</span> (intraepithelial lymphocytosis),</li>\n<li>Crypt <span class=\"customMeta\" data-dictid=\"4c5d5ef6c31692777189820d4b320d\">hyperplasia</span> (increased mitosis)</li>\n<li>Villous <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> (reduced mucosal surface area, causing malabsorption)</li>\n<li>Inflammatory cells infiltration</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents to the clinic with a history of chronic abdominal pain and diarrhoea, worsening notably after consuming wheat-based foods. Physical examination reveals signs suggestive of malabsorption. Considering celiac disease as a possible diagnosis, which of the following statements regarding its pathogenesis is NOT correct?", "options": [{"label": "A", "text": "Gliadin peptides in the lamina propria are deamidated by tissue transglutaminase.", "correct": false}, {"label": "B", "text": "HLA-DR2 or HLA-DR8 significantly influences celiac disease susceptibility.", "correct": true}, {"label": "C", "text": "Gliadin peptides may induce epithelial cells to express IL-15, activating CD8+ lymphocytes.", "correct": false}, {"label": "D", "text": "Type 1 diabetes, Sjögren syndrome, and IgA nephropathy are associated with celiac disease.", "correct": false}], "correct_answer": "B. HLA-DR2 or HLA-DR8 significantly influences celiac disease susceptibility.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old female who recently returned from a tropical region presents with persistent diarrhoea, weight loss, fatigue, anaemia, and vitamin deficiencies, along with a small intestine biopsy findings of villous atrophy and chronic mucosal inflammation. Which part of the gastrointestinal tract is typically NOT affected in this condition?", "options": [{"label": "A", "text": "Duodenum", "correct": false}, {"label": "B", "text": "Jejunum", "correct": false}, {"label": "C", "text": "Ileum", "correct": false}, {"label": "D", "text": "Colon", "correct": true}], "correct_answer": "D. Colon", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:518px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Part of the small intestine</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nutrient absorbed</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Duodenum</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Iron</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Jejunum</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Folic acid</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ileum</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vitamin B12</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-month-old infant presents with failure to thrive, chronic diarrhoea, and poor weight gain. A peripheral blood smear revealed a characteristic appearance, as shown in the image below. Biochemical investigations reveal very low levels of triglycerides, cholesterol, and fat-soluble vitamins. Which genetic mutation is most likely responsible for these findings?", "options": [{"label": "A", "text": "APOB gene mutation", "correct": false}, {"label": "B", "text": "MTTP gene mutation", "correct": true}, {"label": "C", "text": "MYO5B gene mutation", "correct": false}, {"label": "D", "text": "LPL gene mutation", "correct": false}], "correct_answer": "B. MTTP gene mutation", "question_images": ["https://image.prepladder.com/notes/keVIo0RAvbftlOj619681737004834.png"], "explanation_images": ["https://image.prepladder.com/notes/keVIo0RAvbftlOj619681737004834.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Aetiology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mutation in Microsomal <span class=\"customMeta\" data-dictid=\"482f0bd5841692777200af07c2766c\">triglyceride</span> transfer protein (MTTP)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Presentation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Extremely low cholesterol and triglycerides</li>\n<li>Malabsorption of fat-soluble vitamins.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Symptoms</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Presents in <span class=\"customMeta\" data-dictid=\"663d16ec8e169277719095f74c9816\">infancy</span> with failure to thrive, diarrhoea, and steatorrhea.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peripheral smear</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Presence of acanthocytes-RBCs with <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> spikes</li>\n</ul>\n<p><img alt=\"Peripheral_Blood SMEAR OF ABETALIPOPROTEINEMIA\" data-author=\"Ed Uthman \" data-hash=\"763\" data-license=\"CC BY 2.0\" data-source=\"https://en.wikipedia.org/wiki/Acanthocyte\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/keVIo0RAvbftlOj619681737004834.png\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 4-week-old infant presents with severe watery diarrhoea and failure to thrive since birth. Stool studies are negative for pathogens. A small bowel biopsy shows villous atrophy, cytoplasmic inclusion bodies within enterocytes, and reduction of microvilli on the enterocyte surface. Which of the following statements is true regarding this condition?", "options": [{"label": "A", "text": "It is characterised by the absence of ganglion cells in the distal part of the colon.", "correct": false}, {"label": "B", "text": "It is associated with mutations in the MYO5B or STX3 genes.", "correct": true}, {"label": "C", "text": "Histological findings include villous atrophy and crypt hyperplasia.", "correct": false}, {"label": "D", "text": "It is commonly caused by rotavirus infection, which leads to persistent diarrhoea.", "correct": false}], "correct_answer": "B. It is associated with mutations in the MYO5B or STX3 genes.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Definition </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> disorder is characterized by severe, <span class=\"customMeta\" data-dictid=\"97bb95941c169277719084f48d2547\">intractable</span> watery diarrhoea from early infancy.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Aetiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Mutations in the MYO5B or STX3 genes, which are important for developing and maintaining intestinal microvilli.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Villous <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> without marked <span class=\"customMeta\" data-dictid=\"d2a83e1b4c1692777185c446d81c0c\">crypt</span> hyperplasia, appearing as \"thin mucosa\".</li>\n<li>The accumulation of PAS-positive granules within the <span class=\"customMeta\" data-dictid=\"c6223a27fb169277718147405290e1\">apical</span> <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> of <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> enterocytes in the upper <span class=\"customMeta\" data-dictid=\"d2a83e1b4c1692777185c446d81c0c\">crypt</span> is highly characteristic of MVID.\"</li>\n</ul>\n<p><img alt=\"Microvillous <span class=\" custommeta\"=\"\" data-dictid=\"c3b8b9a17416927771906b1bebb13c\"/>Inclusion Disease\" data-author=\"Conrad E Johanson1 , John A Duncan III1 , Petra M Klinge2 , Thomas Brinker2 , Edward G Stopa1 and Gerald D Silverberg\" data-hash=\"764\" data-license=\"CC BY 2.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Ultrastructure_of_choroid_epithelium.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/vnI6dw0AFZ0BMiYBKCBh1737005152.jpg\" /></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old female presents with foul-smelling, greasy diarrhoea, bloating, and abdominal cramps following a hiking trip in a remote area. Stool microscopy reveals cysts containing motile trophozoites. A duodenal biopsy shows luminal organisms, as shown in the image, without tissue invasion. Based on the clinical presentation and biopsy findings, what is the most likely causative organism?", "options": [{"label": "A", "text": "Cryptosporidium", "correct": false}, {"label": "B", "text": "Tropheryma whipplei", "correct": false}, {"label": "C", "text": "Entamoeba histolytica", "correct": false}, {"label": "D", "text": "Giardia lamblia", "correct": true}], "correct_answer": "D. Giardia lamblia", "question_images": ["https://image.prepladder.com/notes/X0EyOKTo6EWsEselduhE1737005349.png"], "explanation_images": ["https://image.prepladder.com/notes/X0EyOKTo6EWsEselduhE1737005349.png", "https://image.prepladder.com/notes/YGethZJxDIyudh8kHdva1743432980.png", "https://image.prepladder.com/notes/I5MVSGZlnYg48RcsSQO11737005773.png", "https://image.prepladder.com/notes/LH2iySjDlwegvwOjBu2d1737005868.png", "https://image.prepladder.com/notes/NKixD6LLwifGQRAehHBM1737006004.jpg"], "explanation": "<p>Correct Answer:D) </p>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Definition</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Flagellated <span class=\"customMeta\" data-dictid=\"101b1e083716927771969fdfd388d4\">protozoan</span> parasite</li>\n<li>Commonly associated with contaminated water sources.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Symptoms</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Foul-smelling-greasy diarrhoea</li>\n<li>Bloating</li>\n<li>Abdominal cramps.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Biopsy findings</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Luminal organisms attached to the intestinal epithelium</li>\n<li>Blunting of the <span class=\"customMeta\" data-dictid=\"bbea63556f1692777202e8abdd66a4\">villi</span> and</li>\n<li>inflammation without tissue invasion.</li>\n</ul>\n<p><img alt=\"Giardiasis_duodenum\" data-author=\"Nephron\" data-hash=\"765\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Giardiasis_duodenum_high.jpg\" data-tags=\"January2025\" height=\"337\" src=\"https://image.prepladder.com/notes/X0EyOKTo6EWsEselduhE1737005349.png\" width=\"500\"/></p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Giardia trophozoites on <span class=\"customMeta\" data-dictid=\"754ab07a2e1692777183ed178c883d\">biopsy</span> are often described as resembling \"falling leaves\"</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"Giardia Trophozoite\" data-author=\"NA\" data-hash=\"5502\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"500\" src=\"https://image.prepladder.com/notes/YGethZJxDIyudh8kHdva1743432980.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which type of ulcer is characterised by multiple punched-out ulcers with undermined edges and necrotic bases on histopathological examination?", "options": [{"label": "A", "text": "TB ulcer", "correct": false}, {"label": "B", "text": "Typhoid ulcer", "correct": false}, {"label": "C", "text": "Amoebic ulcer", "correct": true}, {"label": "D", "text": "Peptic ulcer", "correct": false}], "correct_answer": "C. Amoebic ulcer", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/NKixD6LLwifGQRAehHBM1737006004.jpg"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:575px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Type of Ulcer</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Morphology</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>1. TB Ulcer</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Large, deep ulcers with <span class=\"customMeta\" data-dictid=\"863f5457381692777190f05632a8b2\">irregular</span> borders</li>\n<li>Microcopy-caseating granulomas and <span class=\"customMeta\" data-dictid=\"440f2b916316927771808b8ad44a64\">acid-fast</span> bacilli</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>2. <span class=\"customMeta\" data-dictid=\"f2f6f9068216927772016cacf26183\">Typhoid</span> Ulcer</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Solitary clean-based ulcers</li>\n<li>Microscopy-necrosis with <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> and <span class=\"customMeta\" data-dictid=\"c605d4126116927771916c2002638e\">lymphocyte</span> infiltration</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>3. Amoebic Ulcer</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Multiple <span class=\"customMeta\" data-dictid=\"7134f7f8681692777196fa644c43bf\">punched-out</span> ulcers with undermined edges and necrotic <span class=\"customMeta\" data-dictid=\"1ec6e3e9e11692777182b1220b131a\">bases</span> with surrounding inflammation</li>\n<li>Microscopy- trophozoites of <span class=\"customMeta\" data-dictid=\"b444d7821b16927771873fcd26a46e\">Entamoeba</span> histolytica</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>4. <span class=\"customMeta\" data-dictid=\"f6768ff15f1692777195a493cad3a9\">Peptic</span> Ulcer</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Single or few ulcers with smooth margins and necrotic bases</li>\n<li>Microscopy-chronic <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old patient presents with severe diarrhoea and abdominal pain after completing a course of broad-spectrum antibiotics for a respiratory infection. Stool studies detect the presence of Clostridioides difficile (C. difficile) toxin. A colonoscopy revealed diffuse yellowish plaques covering the colonic mucosa, as shown in the image. Which inflammatory cell type predominantly infiltrates the lamina propria and surface epithelium in this condition?", "options": [{"label": "A", "text": "Lymphocytes", "correct": false}, {"label": "B", "text": "Eosinophils", "correct": false}, {"label": "C", "text": "Neutrophils", "correct": true}, {"label": "D", "text": "Plasma cells", "correct": false}], "correct_answer": "C. Neutrophils", "question_images": ["https://image.prepladder.com/notes/rYQEAi5K9gTrQ3VYxSSC1743433164.png"], "explanation_images": ["https://image.prepladder.com/notes/rYQEAi5K9gTrQ3VYxSSC1743433164.png", "https://image.prepladder.com/notes/JGF0nmMfXBKB42W0n3Sm1737007102.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Aetiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Triggered by Clostridioides difficile infection or <span class=\"customMeta\" data-dictid=\"1c3318a1d91692777181d368e92023\">antibiotic-associated colitis</span> or antibiotic-associated diarrhea (The worst offenders are clindamycin, ampicillin, <span class=\"customMeta\" data-dictid=\"d1e73ea72b1692777181fe0162bd92\">amoxicillin</span> and cephalosporins).</li>\n<li>It is characterised by the formation of pseudomembranes on the <span class=\"customMeta\" data-dictid=\"566fcef0991692777184068f36db82\">colonic</span> mucosa.</li>\n<li>Disruption of the normal <span class=\"customMeta\" data-dictid=\"566fcef0991692777184068f36db82\">colonic</span> <span class=\"customMeta\" data-dictid=\"ee4913785d16927771929d78b794c7\">microbiota</span> by antibiotics allows C. difficile overgrowth.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Histology</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<ul>\n<li>Neutrophils densely <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> the <span class=\"customMeta\" data-dictid=\"9864ad42b21692777191febeee1002\">lamina</span> propria</li>\n<li>Occasional <span class=\"customMeta\" data-dictid=\"18c2380be716927772020c9b2863de\">fibrin</span> <span class=\"customMeta\" data-dictid=\"fc23eb4c0a16927772003dff4101cd\">thrombi</span> in capillaries</li>\n<li>Pseudomembrane - an adherent layer of <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells and debris, with <span class=\"customMeta\" data-dictid=\"66d0cfdc741692777193d2b4fe3249\">mucopurulent</span> <span class=\"customMeta\" data-dictid=\"2df02c8a091692777187db6df500a1\">exudate</span> erupting from damaged crypts(volcano lesions).</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old man presents with chronic abdominal pain, diarrhoea, weight loss, and occasional blood in the stool. A colonoscopy reveals patchy erythema, oedema, and shallow ulcers with intervening normal mucosa in the terminal ileum and colon. The histopathological findings from the affected area are shown below. What histopathological features are observed in this patient's condition?", "options": [{"label": "A", "text": "Presence of noncaseating granulomas", "correct": true}, {"label": "B", "text": "Smooth transition between ulcerated and adjacent normal mucosa", "correct": false}, {"label": "C", "text": "Absence of metaplastic changes in the epithelium", "correct": false}, {"label": "D", "text": "Uniform distribution of inflammation throughout the affected areas", "correct": false}], "correct_answer": "A. Presence of noncaseating granulomas", "question_images": ["https://image.prepladder.com/notes/fo66Rak4hqjYTP5y4Z991737015624.png"], "explanation_images": ["https://image.prepladder.com/notes/ysr3Rxf3I5SMldhId9gz1743481575.png", "https://image.prepladder.com/notes/fo66Rak4hqjYTP5y4Z991737015624.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old male presents with a 6-month history of abdominal pain, diarrhoea, and weight loss. A colonoscopy reveals findings consistent with Crohn's diseaseWhat histological features would you observe in this patient's biopsy?", "options": [{"label": "A", "text": "Inflammation is limited superficial layer", "correct": false}, {"label": "B", "text": "Fibrosis is not seen", "correct": false}, {"label": "C", "text": "Ulcers are limited to mucosa", "correct": false}, {"label": "D", "text": "Ulcers can extend beyond the mucosa", "correct": true}], "correct_answer": "D. Ulcers can extend beyond the mucosa", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Answer:D) Ulcers can extend beyond the mucosa</p>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Biopsy findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Crohn’s disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ulcerative colitis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Histologic Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Transmural inflammation</li>\n<li>Skip lesions</li>\n<li>Cobblestoning</li>\n<li>Fibrosis</li>\n<li>Strictures</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mucosal and <span class=\"customMeta\" data-dictid=\"ebb480187d1692777199e233e9e356\">superficial</span> <span class=\"customMeta\" data-dictid=\"7cb424e4921692777199f9951be2ce\">submucosal</span> inflammation</li>\n<li>Crypt distortion</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Granulomas</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present in approximately 35% of cases</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Not present</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Transmural</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Limited to <span class=\"customMeta\" data-dictid=\"31ae8f4dc51692777193069d92be37\">mucosa</span> and <span class=\"customMeta\" data-dictid=\"ebb480187d1692777199e233e9e356\">superficial</span> submucosa</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Mucosal Atrophy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It can occur after years of disease</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>May revert to near normal after prolonged remission</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Muscularis Propria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Frequently involved in severe cases</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rarely involves</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which statement is true regarding inflammatory bowel disease (IBD) pathogenesis?", "options": [{"label": "A", "text": "NOD2 polymorphisms are closely associated with Crohn's disease in Asian populations.", "correct": false}, {"label": "B", "text": "ATG16L1 mutation promotes ATG16L1 degradation and enhances autophagy.", "correct": false}, {"label": "C", "text": "Dysbiosis is often established at disease presentation in IBD.", "correct": true}, {"label": "D", "text": "All of the above", "correct": false}], "correct_answer": "C. Dysbiosis is often established at disease presentation in IBD.", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding ulcerative colitis and Crohn's disease is true?", "options": [{"label": "A", "text": "Ulcerative colitis is characterised by skip lesions, whereas Crohn’s disease typically presents with continuous inflammation.", "correct": false}, {"label": "B", "text": "Cobblestone appearance is a feature seen in ulcerative colitis and Crohn's disease but is more commonly associated with Crohn's disease.", "correct": false}, {"label": "C", "text": "Ulcerative colitis typically begins in the rectum and extends proximally, whereas Crohn's disease can involve any part of the GI tract.", "correct": true}, {"label": "D", "text": "Fistulae, strictures, and abscesses are more commonly seen in ulcerative colitis than in Crohn's disease.", "correct": false}], "correct_answer": "C. Ulcerative colitis typically begins in the rectum and extends proximally, whereas Crohn's disease can involve any part of the GI tract.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Features</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ulcerative colitis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Crohn’s disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Location</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Limited to <span class=\"customMeta\" data-dictid=\"0fce15e71f1692777184feb9af5303\">colon</span> and rectum</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Can involve any part of the GI tract</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Distribution</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse lesion</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Patchy, with skip lesions.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Gross appearance</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mucosal <span class=\"customMeta\" data-dictid=\"f0f3e105661692777187df507b1f26\">erythema</span> and granularity</li>\n<li>Broad-based ulcers with a continuous pattern</li>\n<li>Pseudopolyps</li>\n<li>Mucosal atrophy</li>\n<li>Smooth, continuous inflammation</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Transmural inflammation</li>\n<li>Aphthous ulcers</li>\n<li>Cobblestone appearance</li>\n<li>Fistulae, strictures, abscesses</li>\n<li>Creeping fat (mesenteric fat wrapping)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Complications</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Toxic megacolon</li>\n<li>Colonic dilation</li>\n<li>Mucosal bridges.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Strictures</li>\n<li>Fistulae.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old male presents to the outpatient clinic with a 5-day history of non-bloody, watery diarrhea. He reports that he recently returned from a hiking trip in a rural area where he drank water from a nearby stream. On examination, he appears dehydrated but is otherwise stable. A stool sample was sent for analysis, which revealed the presence of oocysts. Which of the following is the most likely cause of this patient's gastrointestinal symptoms?", "options": [{"label": "A", "text": "Cryptosporidium", "correct": true}, {"label": "B", "text": "Microsporidium", "correct": false}, {"label": "C", "text": "Giardia lamblia", "correct": false}, {"label": "D", "text": "Entamoeba histolytica", "correct": false}], "correct_answer": "A. Cryptosporidium", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/cCXjiYreWXyZbaIntJcV1743482322.png"], "explanation": "<p>Correct Answer:A) Cryptosporidiu\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 45 y/o male presents with recurrent episodes of abdominal pain and persistent heartburn. Upper gastrointestinal endoscopy reveals multiple duodenal ulcers. Lab investigations show elevated serum gastrin levels (&gt; 1000 pg/ml). Which features are most likely associated with the patient's condition?", "options": [{"label": "A", "text": "Presence of gastrin-secreting tumors in the stomach", "correct": false}, {"label": "B", "text": "Presence of erosive esophagitis and hiatal hernia", "correct": false}, {"label": "C", "text": "Hyperplasia of parietal cells within the stomach", "correct": true}, {"label": "D", "text": "Association with MEN2 gene mutation", "correct": false}], "correct_answer": "C. Hyperplasia of parietal cells within the stomach", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old man presents with vague abdominal discomfort and early satiety. Imaging reveals a large mass in the gastric fundus. He undergoes surgical resection of the mass, and histopathology confirms a gastrointestinal stromal tumor (GIST). Which of the following factors is a favorable prognostic indicator of this condition?", "options": [{"label": "A", "text": "Tumor size &gt; 10 cm", "correct": false}, {"label": "B", "text": "Epithelioid cell type", "correct": false}, {"label": "C", "text": "Gastric location", "correct": true}, {"label": "D", "text": "Intestinal location", "correct": false}], "correct_answer": "C. Gastric location", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:633px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Good prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bad prognosis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tumor size</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>< 5cm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>10cm (Option A)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mitotic rate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>< 5 per HPF</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>10 per HPF</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gastric</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Intestinal (Jejunum, Ileum, Rectum) (Option D)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cell type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Spindle cell type</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Epithelioid cell type (Option B)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mutations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Wild type <span class=\"customMeta\" data-dictid=\"6ff3e96d7d169277718868611768fe\">GIST</span> (Lack mutations in KIT, PDGFR)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Specific PDGFRA mutations, such as the D842V <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> in <span class=\"customMeta\" data-dictid=\"91d131bb0f16927771873b0a2976b3\">exon</span> 18</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Responds to Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> inhibitors.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Resistant to Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> inhibitors.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following markers will help confirm the diagnosis of GIST in C-kit negative cases?", "options": [{"label": "A", "text": "CD34", "correct": false}, {"label": "B", "text": "DOG1", "correct": true}, {"label": "C", "text": "S-100", "correct": false}, {"label": "D", "text": "CD117", "correct": false}], "correct_answer": "B. DOG1", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most common mutation found in GIST (Gastrointestinal Stromal Tumor)?", "options": [{"label": "A", "text": "KIT mutation", "correct": true}, {"label": "B", "text": "PDGFRA mutation", "correct": false}, {"label": "C", "text": "SDH mutation", "correct": false}, {"label": "D", "text": "BRAF mutation", "correct": false}], "correct_answer": "A. KIT mutation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man with intermittent abdominal pain, nausea, and early satiety has a palpable epigastric mass. Imaging shows a well-defined, heterogeneously enhancing stomach mass, and endoscopic biopsy reveals CD117-positive spindle cells. What is the likely origin of this condition?", "options": [{"label": "A", "text": "Cajal cells", "correct": true}, {"label": "B", "text": "Goblet cells", "correct": false}, {"label": "C", "text": "Paneth cells", "correct": false}, {"label": "D", "text": "G cells", "correct": false}], "correct_answer": "A. Cajal cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/RrExWWJtB6fGV3jAYtq91737513726.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cells of origin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cajal cells</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mutations</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common- c-KIT/CD117</li>\n<li>Others:\n\t\t\t\t<ul>\n<li>PDGFR- beta</li>\n<li><strong>S</strong>uccinate <span class=\"customMeta\" data-dictid=\"0d1ed86c771692777185d6b762efd5\">dehydrogenase</span> (SDH)- <strong>S</strong>mall baby( <span class=\"customMeta\" data-dictid=\"318e52e4751692777195acbcdf4551\">Pediatric</span> GIST)</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mechanism</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>c-KIT mutation- Increase in <strong>tyrosinase <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> activity</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Treatment</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Surgery</li>\n<li><strong>Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">Kinase</span> inhibitors- Imatinib</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presents with episodes of flushing, sweating, and colicky abdominal pain. Upper gastrointestinal endoscopy reveals a yellow-tan intramural mass in the stomach. Biopsy revealed sheets of uniform cells with scant granular cytoplasm. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Carcinoid tumor", "correct": true}, {"label": "B", "text": "Gastric outlet obstruction", "correct": false}, {"label": "C", "text": "Hypertrophic pyloric stenosis", "correct": false}, {"label": "D", "text": "Crohn's disease", "correct": false}], "correct_answer": "A. Carcinoid tumor", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 48-year-old female presents with recurrent abdominal pain, bloating, and early satiety for the past few months. Endoscopic biopsy revealed lympho-epithelial lesions with infiltration of small lymphoid cells. Which of the following statements is true regarding this condition?", "options": [{"label": "A", "text": "Dense neutrophilic infiltrate", "correct": false}, {"label": "B", "text": "Reactive-appearing T-cell follicles seen", "correct": false}, {"label": "C", "text": "Plasmacytic differentiation seen", "correct": true}, {"label": "D", "text": "Presents as discrete small nodules in the GI tract", "correct": false}], "correct_answer": "C. Plasmacytic differentiation seen", "question_images": ["https://image.prepladder.com/notes/94mghKzWOsPvvShL7CMn1736949740.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/aKe3bIerkUrBIMWnN7Tg1740664840.mp3", "video": ""}, {"text": "A 45-year-old female has a history of intermittent epigastric discomfort, nausea, and early satiety. Upper endoscopy reveals gastric wall thickening with a leather bottle appearance. Biopsy of the lesion shows signet ring cells infiltrating the gastric mucosa. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Intestinal-type gastric adenocarcinoma", "correct": false}, {"label": "B", "text": "Diffuse-type gastric adenocarcinoma", "correct": true}, {"label": "C", "text": "Peptic ulcer disease", "correct": false}, {"label": "D", "text": "Gastric lymphoma", "correct": false}], "correct_answer": "B. Diffuse-type gastric adenocarcinoma", "question_images": ["https://image.prepladder.com/notes/4gEublZ9porxMWHRxfOU1736948610.png"], "explanation_images": ["https://image.prepladder.com/content/zmfIkdlzLJ9pjL9D7Trb1740725704.png", "https://image.prepladder.com/content/OlP0qZMeJ0sW85I9I9CF1740725723.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:642px\">\n<tbody>\n<tr>\n<td>\n<p><strong>Features</strong></p>\n</td>\n<td>\n<p><strong>Intestinal type <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">Gastric</span> <span class=\"customMeta\" data-dictid=\"362992dbb11692777180f9017fc04d\">adenocarcinoma</span> (Option A)</strong></p>\n</td>\n<td>\n<p><strong>Diffuse-type <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> <span class=\"customMeta\" data-dictid=\"362992dbb11692777180f9017fc04d\">adenocarcinoma</span> (Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Predominantly in the <span class=\"customMeta\" data-dictid=\"96976bc5fc1692777181dc8403015a\">antrum</span> or pyloric region</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse involvement of <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> body and fundus</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H. pylori infection, high <span class=\"customMeta\" data-dictid=\"6cdcd39cf2169277719068e247e38d\">intake</span> of smoked/pickled foods, smoking, chronic gastritis, old age</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CDH1 gene mutation, younger age</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Appearance on endoscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ulcerative, <span class=\"customMeta\" data-dictid=\"a3c898fa9e1692777196b39e3bf93c\">polypoid</span> masses (localised growth)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thickening of <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> wall (due to <span class=\"customMeta\" data-dictid=\"89275101301692777186567d1912a0\">diffuse</span> infiltration).</p>\n<p>Linitis plastica (leather bottle appearance)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Well-differentiated <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> structures with intestinal metaplasia.</p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"175\" src=\"https://image.prepladder.com/content/zmfIkdlzLJ9pjL9D7Trb1740725704.png\" width=\"200\"/></p>\n<p> </p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Signet ring cells and <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of poorly <span class=\"customMeta\" data-dictid=\"cc3903876f1692777184d07cde04a3\">cohesive</span> cells into the <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> mucosa.</p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"157\" src=\"https://image.prepladder.com/content/OlP0qZMeJ0sW85I9I9CF1740725723.png\" width=\"250\"/></p>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Better</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Poorer</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/tT2kkoet8tipHkeI5Akc1740665380.mp3", "video": ""}, {"text": "A 60-year-old male presents with a history of epigastric pain, unintentional weight loss, and early satiety over the past few months. An upper GI endoscopy revealed a nodular mass on the gastric wall, and a biopsy revealed well-differentiated glandular structures with intestinal metaplasia. Which of the following is least likely associated with this condition?", "options": [{"label": "A", "text": "Helicobacter pylori (H. pylori) infection", "correct": false}, {"label": "B", "text": "APC gene mutation", "correct": false}, {"label": "C", "text": "CDH1 gene mutation", "correct": true}, {"label": "D", "text": "High intake of smoked or pickled foods", "correct": false}], "correct_answer": "C. CDH1 gene mutation", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is NOT a recognised risk factor for gastric adenocarcinoma?", "options": [{"label": "A", "text": "Alcohol", "correct": false}, {"label": "B", "text": "Hot beverages", "correct": false}, {"label": "C", "text": "Blood group O", "correct": true}, {"label": "D", "text": "H. pylori", "correct": false}], "correct_answer": "C. Blood group O", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which cells are primarily responsible for secreting neutral mucin that forms a protective layer in the stomach?", "options": [{"label": "A", "text": "Parietal cells", "correct": false}, {"label": "B", "text": "Chief cells", "correct": false}, {"label": "C", "text": "Foveolar cells", "correct": true}, {"label": "D", "text": "Enterochromaffin cells", "correct": false}], "correct_answer": "C. Foveolar cells", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Functions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Parietal cells<strong> (Option A)</strong></li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Secrete <span class=\"customMeta\" data-dictid=\"c6cd3307e0169277718936624365e5\">hydrochloric acid</span> (HCl) and <span class=\"customMeta\" data-dictid=\"a6795c876e169277719057a1099465\">intrinsic</span> factor.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Chief cells<strong> (Option B)</strong></li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Secrete <span class=\"customMeta\" data-dictid=\"ba6a4968271692777195adb7c5c8f0\">pepsinogen</span> (Inactive <span class=\"customMeta\" data-dictid=\"ae13cdc5c3169277719683e9f6bda5\">precursor</span> of the pepsin).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Foveolar cells</li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Secrete neutral <span class=\"customMeta\" data-dictid=\"7d30ef9aee16927771936bdac2c1ff\">mucin</span> and <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> a protective layer over the stomach lining.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Enterochromaffin cells</li>\n</ol>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Release of <span class=\"customMeta\" data-dictid=\"06eba971ce169277719884f8c62937\">serotonin</span> and <span class=\"customMeta\" data-dictid=\"b5d4ddbfe71692777189a12acd5502\">histamine</span> to regulate <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> functions.</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient presents with persistent abdominal discomfort, nausea, weight loss, and occasional diarrhoea. He was recently diagnosed with a viral infection. The following gross image of the gastric mucosa is observed upon upper gastrointestinal endoscopy. Which of the following is correct regarding the patient's condition?", "options": [{"label": "A", "text": "Associated with excessive secretion of TNF-α.", "correct": false}, {"label": "B", "text": "Histopathologically, villous atrophy is observed.", "correct": false}, {"label": "C", "text": "Increases the risk of gastric carcinoma.", "correct": true}, {"label": "D", "text": "More common in females and can cause protein-losing enteropathy.", "correct": false}], "correct_answer": "C. Increases the risk of gastric carcinoma.", "question_images": ["https://image.prepladder.com/notes/XyLojUEH3YAOGltCIWxy1743429870.png"], "explanation_images": ["https://image.prepladder.com/notes/9wJxB5jmLJRHZJgEhDN21736947848.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old female presents with recurrent epigastric discomfort and intermittent nausea. Histopathological examination of gastric biopsy samples reveals irregular, cystically dilated, and elongated foveolar glands. She also has a history of untreated H. pylori infection. What type of lesions is most likely to be associated with these findings?", "options": [{"label": "A", "text": "Hyperplastic polyps", "correct": true}, {"label": "B", "text": "Gastric adenomas", "correct": false}, {"label": "C", "text": "Inflammatory fibroid polyps", "correct": false}, {"label": "D", "text": "Juvenile polyps", "correct": false}], "correct_answer": "A. Hyperplastic polyps", "question_images": ["https://image.prepladder.com/notes/JnKjN0dzooB3xp0daGNX1743429475.png"], "explanation_images": ["https://image.prepladder.com/notes/pYqfLbUYi3BXs8rG0XoP1736939250.jpg", "https://image.prepladder.com/content/rlUibgUgiezwpXZCo4lf1740725482.png", "https://image.prepladder.com/notes/pALH4dDmkJtPBOfoyMa91736939731.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/hNAODuXYtLomT1CyqN8Q1740664820.mp3", "video": ""}, {"text": "A 60-year-old man on long-term proton pump inhibitor therapy for acid reflux undergoes an upper gastrointestinal endoscopy for recurrent epigastric discomfort. The endoscopy reveals smooth-surfaced lesions in the gastric body and fundus. Which statement about these findings is likely correct?", "options": [{"label": "A", "text": "PPIs decrease gastrin secretion, reducing the risk of fundic gland polyps", "correct": false}, {"label": "B", "text": "Fundic gland polyps are commonly associated with H. pylori infection.", "correct": false}, {"label": "C", "text": "Composed of cystically dilated glands lined by parietal, chief, and foveolar cells.", "correct": true}, {"label": "D", "text": "Sporadic fundic gland polyps carry a significant risk of neoplasia.", "correct": false}], "correct_answer": "C. Composed of cystically dilated glands lined by parietal, chief, and foveolar cells.", "question_images": ["https://image.prepladder.com/notes/J6QeHg6B9T1OTp8JGD0g1743429123.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/sMDtEQ60jIvsEDhhkNO21747670190.mp3", "video": ""}, {"text": "Which type of gastritis is associated with a distinctive endoscopic appearance characterised by thickened folds, small nodules, and central aphthous ulceration affecting the entire stomach?", "options": [{"label": "A", "text": "Eosinophilic gastritis", "correct": false}, {"label": "B", "text": "Lymphocytic gastritis", "correct": true}, {"label": "C", "text": "Granulomatous gastritis", "correct": false}, {"label": "D", "text": "Chemical gastritis", "correct": false}], "correct_answer": "B. Lymphocytic gastritis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presents with chronic epigastric pain, nausea, and occasional vomiting. Upper gastrointestinal endoscopy reveals diffuse mucosal atrophy. Biopsy confirms chronic gastritis. Which of the following is a characteristic feature of Chronic Gastritis Type A?", "options": [{"label": "A", "text": "Predominantly affects the antrum of the stomach", "correct": false}, {"label": "B", "text": "Autoimmune destruction of parietal cells", "correct": true}, {"label": "C", "text": "Associated with H. pylori infection", "correct": false}, {"label": "D", "text": "Increased risk of gastric carcinoma", "correct": false}], "correct_answer": "B. Autoimmune destruction of parietal cells", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic <span class=\"customMeta\" data-dictid=\"7861e10657169277718815c2f42a75\">Gastritis</span> Type A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic <span class=\"customMeta\" data-dictid=\"7861e10657169277718815c2f42a75\">Gastritis</span> Type B</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location</strong><strong> </strong><strong> </strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fundus and body of the stomach</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antrum and pyloric region of the stomach (Option A)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aetiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autoimmune</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H. pylori infection or <span class=\"customMeta\" data-dictid=\"b924074dfe16927771933b6d50eaac\">NSAID</span> use</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathophysiology</strong><strong> </strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autoimmune destruction of <span class=\"customMeta\" data-dictid=\"51df38de3d1692777194ced4c4bab5\">parietal</span> cells (Option B)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H. pylori-induced <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> of <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> <span class=\"customMeta\" data-dictid=\"31ae8f4dc51692777193069d92be37\">mucosa</span> (Option C)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autoantibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autoantibodies against <span class=\"customMeta\" data-dictid=\"51df38de3d1692777194ced4c4bab5\">parietal</span> cells and Antibodies against <span class=\"customMeta\" data-dictid=\"a6795c876e169277719057a1099465\">intrinsic</span> factors (↓Vit B12 absorption).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Not autoimmune; may have H. pylori antibodies.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intrinsic factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reduced due to <span class=\"customMeta\" data-dictid=\"51df38de3d1692777194ced4c4bab5\">parietal</span> cell destruction.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It may be normal unless <span class=\"customMeta\" data-dictid=\"e627149ccc169277718241f723cc82\">atrophic gastritis</span> is present.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gastric acid production</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autoantibodies against <span class=\"customMeta\" data-dictid=\"51df38de3d1692777194ced4c4bab5\">parietal</span> cells lead to decreased/absent HCl <span class=\"customMeta\" data-dictid=\"9b0ae3750916927771986c15d4ff4d\">secretion</span> and ↑gastrin synthesis.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal to increased acid <span class=\"customMeta\" data-dictid=\"9b0ae3750916927771986c15d4ff4d\">secretion</span> due to H. pylori.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histological findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphocytic and <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell infiltrate.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neutrophilic infiltrate, <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> follicles.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Complications</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pernicious anaemia, <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> carcinoid, adenocarcinoma.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peptic ulcers, <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> adenocarcinoma, MALToma.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk of <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased, especially with H. pylori infection (Option D)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old patient presents with recurrent epigastric pain and signs of gastrointestinal bleeding. An upper endoscopy reveals gastric ulcers, and a biopsy is performed for further evaluation. Which stain is best for identifying the causative organism in this condition?", "options": [{"label": "A", "text": "Warthin Starry silver stain", "correct": false}, {"label": "B", "text": "Wright stain", "correct": false}, {"label": "C", "text": "Modified Giemsa stain", "correct": true}, {"label": "D", "text": "Gram stain", "correct": false}], "correct_answer": "C. Modified Giemsa stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/ARaQBGq70dTnTCbgVWst1736935252.png", "https://image.prepladder.com/notes/3WsOgoODAp1aLXWSlqzi1736935369.jpg"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is NOT a protective factor against Peptic Ulcer Disease?", "options": [{"label": "A", "text": "Mucus", "correct": false}, {"label": "B", "text": "Bicarbonate", "correct": false}, {"label": "C", "text": "COX-1", "correct": false}, {"label": "D", "text": "Pepsin", "correct": true}], "correct_answer": "D. Pepsin", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:490px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Protective factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Damaging factors</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mucus <strong>(Option A)</strong></li>\n<li>Bicarbonate <strong>(Option B)</strong></li>\n<li>COX 1<strong> (Option C)</strong></li>\n</ul>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>HCl</li>\n<li>Pepsin</li>\n<li>H.pylori</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old man experiences recurrent upper abdominal pain worsened after meals, unresponsive to over-the-counter antacids. Which of the following is NOT typically a risk factor for the patient’s presentation?", "options": [{"label": "A", "text": "Helicobacter pylori infection", "correct": false}, {"label": "B", "text": "Cocaine use", "correct": false}, {"label": "C", "text": "Cigarette smoking", "correct": false}, {"label": "D", "text": "Obesity", "correct": true}], "correct_answer": "D. Obesity", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old female with traumatic brain injury undergoes emergency craniotomy and is now intubated in the neurosurgical ICU. She suddenly develops hematemesis despite stabilisation. What is the most likely cause of the patient's bleeding?", "options": [{"label": "A", "text": "Curling ulcer", "correct": false}, {"label": "B", "text": "Cushing ulcer", "correct": true}, {"label": "C", "text": "Gastric antral vascular ectasia (GAVE)", "correct": false}, {"label": "D", "text": "Dieulafoy lesions", "correct": false}], "correct_answer": "B. Cushing ulcer", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Answer:B) </p>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:703px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cushing's Ulcers</strong> (Option B)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Curling Ulcers</strong> (Option A)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Usually found in the stomach (cardia), oesophagus, or duodenum</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Typically occur in the <span class=\"customMeta\" data-dictid=\"bdbac654081692777196f9aab116f0\">proximal</span> duodenum</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated <span class=\"customMeta\" data-dictid=\"cd42e0ddad1692777190d18c595ec5\">intracranial</span> pressure (e.g., head trauma, <span class=\"customMeta\" data-dictid=\"cd42e0ddad1692777190d18c595ec5\">intracranial</span> haemorrhage)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe burns (involving >30% of body surface area) or trauma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"5fb29f3cd516927772017bd29c2581\">vagal</span> activity stimulates <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> acid secretion, leading to <span class=\"customMeta\" data-dictid=\"7b4370a0b01692777201a5bc0739c2\">ulcer</span> formation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Result from decreased mucosal <span class=\"customMeta\" data-dictid=\"82cc227a1c169277718387905b50c6\">blood flow</span> due to <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"9402185d4b1692777189cb62891ff1\">hypotension</span> or stress-induced vasoconstriction</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ulcer characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Deep ulcers; increased risk of perforation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Superficial ulcers.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 30 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following antibodies is associated with celiac disease?", "options": [{"label": "A", "text": "Anti-TTG", "correct": true}, {"label": "B", "text": "ANCA", "correct": false}, {"label": "C", "text": "ASCA", "correct": false}, {"label": "D", "text": "AMA", "correct": false}], "correct_answer": "A. Anti-TTG", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Anti-TTG\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Hepcidin acts on which of the following?", "options": [{"label": "A", "text": "Transferrin", "correct": false}, {"label": "B", "text": "Ferroportin", "correct": true}, {"label": "C", "text": "Ferritin", "correct": false}, {"label": "D", "text": "Divalent metal transporter 1", "correct": false}], "correct_answer": "B. Ferroportin", "question_images": [], "explanation_images": [], "explanation": "\n<table>\n<thead>\n<tr>\n<td>\n<p style=\"text-align: center;\"><strong>Site of Iron Transfer</strong></p>\n</td>\n<td>\n<p style=\"text-align: center;\"><strong>Mechanism of Iron Transfer</strong></p>\n</td>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n<p>Intestine</p>\n</td>\n<td>\n<p>Absorption of dietary iron occurs mainly in the <span class=\"customMeta\" data-dictid=\"280e59e9331692777186f3beac2c41\">duodenum</span> and upper jejunum. Iron is transported across the enterocytes by the <span class=\"customMeta\" data-dictid=\"9c9c29820b169277718670a8b16a3b\">divalent</span> metal <span class=\"customMeta\" data-dictid=\"850b296dd316927772005b651f6e87\">transporter</span> 1 (DMT1) and released into the <span class=\"customMeta\" data-dictid=\"a813884d6016927771838d2d1f9d1d\">bloodstream</span> via ferroportin.</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Bloodstream</p>\n</td>\n<td>\n<p>Iron is <span class=\"customMeta\" data-dictid=\"d82fcb9d1f16927771836a9f6ccf14\">bound</span> to transferrin, a protein that transports iron in the blood. Transferrin-bound iron is delivered to cells expressing <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptors through receptor-mediated endocytosis. Iron is released from <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> in the <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> environment of the <span class=\"customMeta\" data-dictid=\"47d1d777241692777187070f5b3ebe\">endosome</span> and transported into the <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> by <span class=\"customMeta\" data-dictid=\"9c9c29820b169277718670a8b16a3b\">divalent</span> metal <span class=\"customMeta\" data-dictid=\"850b296dd316927772005b651f6e87\">transporter</span> 1 (DMT1).</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Macrophages</p>\n</td>\n<td>\n<p>Macrophages <span class=\"customMeta\" data-dictid=\"d1a139c3bf16927771954479445976\">phagocytose</span> senescent red blood cells and recycle the iron from hemoglobin. Inside macrophages, <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> is degraded into <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> and globin. <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">Heme</span> <span class=\"customMeta\" data-dictid=\"ffc1e1f8e516927771943f56ed8560\">oxygenase</span> breaks down <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> into biliverdin, releasing iron. Iron is stored within the macrophages as <span class=\"customMeta\" data-dictid=\"91d0e4c6fa16927772025f96b44b27\">ferritin</span> or transported out of the cells via <span class=\"customMeta\" data-dictid=\"1c8d5ddd3a1692777202cda4c14994\">ferroportin</span> and delivered to the <span class=\"customMeta\" data-dictid=\"a813884d6016927771838d2d1f9d1d\">bloodstream</span> for utilization.</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Liver</p>\n</td>\n<td>\n<p>Hepatocytes take up iron from the <span class=\"customMeta\" data-dictid=\"a813884d6016927771838d2d1f9d1d\">bloodstream</span> via <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptor-mediated endocytosis. Inside hepatocytes, iron is stored in <span class=\"customMeta\" data-dictid=\"91d0e4c6fa16927772025f96b44b27\">ferritin</span> or used for the <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> of iron-containing proteins, such as <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> and iron-sulfur clusters. <span class=\"customMeta\" data-dictid=\"7a1ae24f701692777187a7f60bbd9f\">Excess</span> iron can be exported out of hepatocytes through <span class=\"customMeta\" data-dictid=\"1c8d5ddd3a1692777202cda4c14994\">ferroportin</span> and released into the <span class=\"customMeta\" data-dictid=\"a813884d6016927771838d2d1f9d1d\">bloodstream</span> or stored in ferritin.</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Bone Marrow</p>\n</td>\n<td>\n<p>Iron is necessary for erythropoiesis, the production of red blood cells. In the bone marrow, iron is taken up by developing erythroblasts through <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptor-mediated endocytosis. Iron is utilized for the <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> of heme, which is incorporated into hemoglobin.</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Placenta</p>\n</td>\n<td>\n<p>During pregnancy, iron is transferred from the mother to the <span class=\"customMeta\" data-dictid=\"421fecf0e21692777202704942ac48\">fetus</span> through the placenta. <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">Transferrin</span> receptors on the <span class=\"customMeta\" data-dictid=\"797686400a16927771956b27d401ff\">placental</span> syncytiotrophoblasts bind to <span class=\"customMeta\" data-dictid=\"a191a950d7169277719148e72a75e2\">maternal</span> transferrin, and iron is transported across the syncytiotrophoblasts and released into the <span class=\"customMeta\" data-dictid=\"f375a3584316927772020efa386e3e\">fetal</span> <span class=\"customMeta\" data-dictid=\"337d16dac5169277718474b97f6e4a\">circulation</span> for <span class=\"customMeta\" data-dictid=\"f375a3584316927772020efa386e3e\">fetal</span> development.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a characteristic feature of Barrett's oesophagus?", "options": [{"label": "A", "text": "Squamous metaplasia", "correct": false}, {"label": "B", "text": "Severe dysplasia", "correct": false}, {"label": "C", "text": "Intestinal metaplasia", "correct": true}, {"label": "D", "text": "Cuboidal metaplasia", "correct": false}], "correct_answer": "C. Intestinal metaplasia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/4FHhzpZmVOkZoBZ84w7n1746699478.png", "https://image.prepladder.com/content/RtUFRLEBnZ6sJW2eSNTv1746699486.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old child was admitted to the hospital with a history of prolapsing rectal mass and painless rectal bleeding. The histopathological image of the mass is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Peutz-Jegher syndrome", "correct": false}, {"label": "B", "text": "Villous adenoma", "correct": false}, {"label": "C", "text": "Juvenile polyp", "correct": true}, {"label": "D", "text": "Tubular adenoma", "correct": false}], "correct_answer": "C. Juvenile polyp", "question_images": ["https://image.prepladder.com/content/OIO4esJJfcwsZQwx0k4P1746517976.png"], "explanation_images": ["https://image.prepladder.com/content/8sFldQdQt1hCjl7mTapi1746518012.png"], "explanation": "<p>Correct Answer C - <span class=\"customMeta\" data-dictid=\"b5d5db1f591692777190869c6a7223\">Juvenile</span&g\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old man presented with a retroperitoneal mass. A biopsy of the lesion is shown in the image below. Molecular analysis revealed t(12;16). What is the most likely condition?", "options": [{"label": "A", "text": "Myxoid liposarcoma", "correct": true}, {"label": "B", "text": "Lipoma", "correct": false}, {"label": "C", "text": "Spindle lipoma", "correct": false}, {"label": "D", "text": "Polymorphic lipoma", "correct": false}], "correct_answer": "A. Myxoid liposarcoma", "question_images": ["https://image.prepladder.com/content/qnzVNJubWWIdc5J51sRN1746517605.png"], "explanation_images": [], "explanation": "<p>Correct Answer A - <span class=\"customMeta\" data-dictid=\"58f239fc181692777193528b77cc8c\">Myxoid</span&g\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old female presents with chest pain, recurrent heartburn, and dysphagia. A barium swallow shows a bird beak sign. Which of the following statements is true regarding the condition in this patient?", "options": [{"label": "A", "text": "Relaxation of LES", "correct": false}, {"label": "B", "text": "Increased peristalsis", "correct": false}, {"label": "C", "text": "Decreased release of NO and VIP in the distal esophagus", "correct": true}, {"label": "D", "text": "Decreased tone of LES", "correct": false}], "correct_answer": "C. Decreased release of NO and VIP in the distal esophagus", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true about the pathogenesis of Hirschsprung disease?", "options": [{"label": "A", "text": "Failure of migration of neural crest cells", "correct": true}, {"label": "B", "text": "Increase in ganglion cells", "correct": false}, {"label": "C", "text": "Visceral myopathy", "correct": false}, {"label": "D", "text": "Obstruction by inflammatory strictures", "correct": false}], "correct_answer": "A. Failure of migration of neural crest cells", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old patient presents with a history of malabsorption, diarrhea, and poor appetite. A duodenal biopsy shows crypt hyperplasia, villi atrophy, and CD8+ cells in the lamina propria. What is the most probable diagnosis?", "options": [{"label": "A", "text": "Environmental enteropathy", "correct": false}, {"label": "B", "text": "Celiac disease", "correct": true}, {"label": "C", "text": "Whipple’s disease", "correct": false}, {"label": "D", "text": "Chronic pancreatitis", "correct": false}], "correct_answer": "B. Celiac disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/RplxumIjWNASgjfrQEHZ1746437953.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black\">\n<p><strong>Celiac disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Definition </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Autoimmune disorder <span class=\"customMeta\" data-dictid=\"3978e9614f1692777200abbe4cfa34\">triggered</span> by ingesting gluten-containing foods in genetically <span class=\"customMeta\" data-dictid=\"55691242bb1692777199360f64cb67\">susceptible</span> individuals.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Synonym</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Gluten-sensitive enteropathy</li>\n<li>Celiac sprue</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Diagnosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Biopsy of the second part of the <span class=\"customMeta\" data-dictid=\"280e59e9331692777186f3beac2c41\">duodenum</span> or <span class=\"customMeta\" data-dictid=\"bdbac654081692777196f9aab116f0\">proximal</span> jejunum</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Serum markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Anti-tissue <span class=\"customMeta\" data-dictid=\"4a47b71b801692777200d06df00a08\">transglutaminase</span> (tTG)-most sensitive</li>\n<li>Anti-endomysial antibodies (EMA)-most specific</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Increased <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> <strong>CD8+ T lymphocytes </strong>(intraepithelial lymphocytosis),</li>\n<li><strong>Crypt hyperplasia</strong> (increased mitosis)</li>\n<li><strong>Villous atrophy</strong> (reduced mucosal surface area, causing malabsorption)</li>\n<li>Inflammatory cells infiltration</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding Peutz-Jeghers syndrome is correct? An arborizing pattern of smooth muscle Loss of heterozygosity in STK11 gene Multiple GI polyps Autosomal recessive inheritance Congenital hypertrophy of retinal pigmental epithelium is seen", "options": [{"label": "A", "text": "2, 4, 5", "correct": false}, {"label": "B", "text": "1, 2, 3", "correct": true}, {"label": "C", "text": "1, 3, 4", "correct": false}, {"label": "D", "text": "2, 3, 5", "correct": false}], "correct_answer": "B. 1, 2, 3", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/FX1s2GnlJ5zzmT7tSYga1745495351.png", "https://image.prepladder.com/content/cDGb7CFZQ2ITgqPC9e8n1745495350.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The cells lining the isthmus of gastric pits are:", "options": [{"label": "A", "text": "Chief cells", "correct": false}, {"label": "B", "text": "Stem cells", "correct": true}, {"label": "C", "text": "Parietal cells", "correct": false}, {"label": "D", "text": "Mucous cells", "correct": false}], "correct_answer": "B. Stem cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/4cF8eqyubtMC8LW4nxPS1746552317.png", "https://image.prepladder.com/notes/aco8d4nWCiDgwLWKGZlw1746552335.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:702px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Cell Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Function</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Stem cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Isthmus of <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> pits</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Regenerate the various types of <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> epithelial cells.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Parietal cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Fundus and body of the stomach</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>It secretes <span class=\"customMeta\" data-dictid=\"c6cd3307e0169277718936624365e5\">hydrochloric acid</span> (HCl) and <span class=\"customMeta\" data-dictid=\"a6795c876e169277719057a1099465\">intrinsic</span> factors that are important for <span class=\"customMeta\" data-dictid=\"47d4bcce081692777186a1aafdde1a\">digestion</span> and vitamin B12 absorption.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Chief cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Fundus and body of the stomach</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Secrete pepsinogen, which is converted to <span class=\"customMeta\" data-dictid=\"efcc125d081692777195644e4e7577\">pepsin</span> in the <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> environment, to aid in protein digestion.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Mucous cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Surface <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> of the stomach lining and neck of <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> pits</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Secrete <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> to protect the stomach lining from the <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> environment and <span class=\"customMeta\" data-dictid=\"a32cad4dbc169277718669cfb165a5\">digestive</span> enzymes.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Endocrine cells (G cells)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Antrum of the stomach</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Secrete gastrin, which stimulates acid <span class=\"customMeta\" data-dictid=\"9b0ae3750916927771986c15d4ff4d\">secretion</span> by <span class=\"customMeta\" data-dictid=\"51df38de3d1692777194ced4c4bab5\">parietal</span> cells and <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> motility.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Enteroendocrine cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Throughout the <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> mucosa</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Secrete various hormones such as somatostatin, serotonin, and <span class=\"customMeta\" data-dictid=\"b5d4ddbfe71692777189a12acd5502\">histamine</span> to regulate <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> functions.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The absence of the structure will be present in all except:", "options": [{"label": "A", "text": "Pernicious anemia", "correct": false}, {"label": "B", "text": "Autoimmune Metaplastic Atrophic Gastritis", "correct": false}, {"label": "C", "text": "Vitamin B12 Deficiency", "correct": false}, {"label": "D", "text": "Zollinger-Ellison syndrome", "correct": true}], "correct_answer": "D. Zollinger-Ellison syndrome", "question_images": ["https://image.prepladder.com/notes/fMQlBFpyNoFcvGvQGRow1746549221.jpg"], "explanation_images": ["https://image.prepladder.com/notes/rGRY1A7acwrv06PsLsll1746549256.jpg", "https://image.prepladder.com/notes/GjFnSgvAzTVejRtYBLzg1746549199.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true about celiac disease?", "options": [{"label": "A", "text": "Most common cause of malnutrition in developing countries", "correct": false}, {"label": "B", "text": "Can be diagnosed with CECT", "correct": false}, {"label": "C", "text": "Improves with food rich in carbohydrates", "correct": false}, {"label": "D", "text": "Increased risk of GI lymphoma", "correct": true}], "correct_answer": "D. Increased risk of GI lymphoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/89vR4bG26qcKNFWM9Sh71745495342.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black\">\n<p style=\"text-align:center\"><strong>Celiac disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Definition </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Autoimmune disorder <span class=\"customMeta\" data-dictid=\"3978e9614f1692777200abbe4cfa34\">triggered</span> by ingesting gluten-containing foods in genetically <span class=\"customMeta\" data-dictid=\"55691242bb1692777199360f64cb67\">susceptible</span> individuals.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Synonym</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Gluten-sensitive enteropathy</li>\n<li>Celiac sprue</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Diagnosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Biopsy of the second part of the <span class=\"customMeta\" data-dictid=\"280e59e9331692777186f3beac2c41\">duodenum</span> or <span class=\"customMeta\" data-dictid=\"bdbac654081692777196f9aab116f0\">proximal</span> jejunum</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Serum markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Anti-tissue <span class=\"customMeta\" data-dictid=\"4a47b71b801692777200d06df00a08\">transglutaminase</span> (tTG): Most sensitive</strong></li>\n<li><strong>Anti-endomysial antibodies (EMA): Most specific </strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Increased <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> <strong>CD8+ T lymphocytes</strong> (intraepithelial lymphocytosis),</li>\n<li><strong>Crypt hyperplasia</strong> (increased mitosis)</li>\n<li><strong>Villous atrophy</strong> (reduced mucosal surface area, causing malabsorption)</li>\n<li>Inflammatory cells infiltration</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following set of statements is true about familial adenomatous polyposis (FAP)? It is autosomal recessive. If not treated, 100% of the cases progress to adenocarcinoma of the colon. Polyps do not arise after puberty. It is associated with congenital hypertrophy of the retinal pigment epithelium.", "options": [{"label": "A", "text": "2 and 4", "correct": true}, {"label": "B", "text": "1 and 4", "correct": false}, {"label": "C", "text": "2 and 3", "correct": false}, {"label": "D", "text": "3 and 4", "correct": false}], "correct_answer": "A. 2 and 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/pBNo1Qs12Ee7gO0kFPex1745257966.png", "https://image.prepladder.com/notes/O6TpxoDeepEYgi9SpFNx1745258066.png", "https://image.prepladder.com/notes/npdJW6FW6lNU65sW5GIq1745258149.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following diseases with their respective gene mutation: 1. Familial adenomatous polyposis i. SMAD4 2. Juvenile polyposis ii. STK11 3. Tuberous sclerosis iii. APC gene 4. Peutz-Jeghers syndrome iv. TSC1", "options": [{"label": "A", "text": "A-i, B-ii, C-iii, D-iv", "correct": false}, {"label": "B", "text": "A-ii, B-iii, C-i, D-iv", "correct": false}, {"label": "C", "text": "A-iii, B-i, C-iv, D-ii", "correct": true}, {"label": "D", "text": "A-iv, B-ii, C-iii, D-i", "correct": false}], "correct_answer": "C. A-iii, B-i, C-iv, D-ii", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genes <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Manifestations </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MLH1, MSH2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Results in <span class=\"customMeta\" data-dictid=\"20b150babc1692777192cc2f5fe1e3\">microsatellite</span> instability</li>\n<li>Causes cluster of cancer: Colorectal, Endometrial, Ovarian, Pancreatic cancers</li>\n<li>Colon cancer develops at a young age, and it usually occurs on the right side.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SMAD4 and BMPR1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Juvenile <span class=\"customMeta\" data-dictid=\"fe6b8df2fa1692777196938c42762a\">polyposis</span> syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>STK11</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peutz-Jeghers syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>APC gene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Familial <span class=\"customMeta\" data-dictid=\"bf1f32fbd81692777180c0d2485ab2\">Adenomatous</span> Polyposis(FAP), <span class=\"customMeta\" data-dictid=\"a325d0c14e16927771992fe8a96758\">sporadic</span> <span class=\"customMeta\" data-dictid=\"0fce15e71f1692777184feb9af5303\">colon</span> cancer, <span class=\"customMeta\" data-dictid=\"19a263793116927771888661f5a936\">Gardner syndrome</span> and Turcot syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MUTYH</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MUTYH-associated polyposis.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TSC1 (hamartin) or TSC2 (tuberin)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tuberous sclerosis</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child presents with failure to pass stools and is diagnosed with Hirschsprung disease. Which among the following layers of the colon will show congenital absence of neurons?", "options": [{"label": "A", "text": "1 &amp; 2", "correct": false}, {"label": "B", "text": "2 &amp; 3", "correct": true}, {"label": "C", "text": "3 &amp; 4", "correct": false}, {"label": "D", "text": "1 &amp; 4", "correct": false}], "correct_answer": "B. 2 & 3", "question_images": ["https://image.prepladder.com/content/57oMD5hdOlteVgNrd6hF1724915066.png"], "explanation_images": [], "explanation": "<p>Correct Option B - 2 &amp; 3\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which vitamin is to be supplemented in a patient following gastrectomy?", "options": [{"label": "A", "text": "Vitamin A", "correct": false}, {"label": "B", "text": "Vitamin B1", "correct": false}, {"label": "C", "text": "Vitamin C", "correct": false}, {"label": "D", "text": "Vitamin B12", "correct": true}], "correct_answer": "D. Vitamin B12", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Vitamin B12\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child presents with itchy lesions and diarrhea and has been advised to follow a gluten-free diet. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Celiac disease", "correct": true}, {"label": "B", "text": "Whipple's disease", "correct": false}, {"label": "C", "text": "Crohn's disease", "correct": false}, {"label": "D", "text": "Ulcerative colitis", "correct": false}], "correct_answer": "A. Celiac disease", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An adult man presents with a protruding abdomen, diarrhea, visual disturbances and neurological manifestations. Based on the given peripheral smear, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Abetalipoproteinemia", "correct": true}, {"label": "B", "text": "Whipple’s disease", "correct": false}, {"label": "C", "text": "Menetrier's Disease", "correct": false}, {"label": "D", "text": "Uremia", "correct": false}], "correct_answer": "A. Abetalipoproteinemia", "question_images": ["https://image.prepladder.com/content/ghybwnx6x9mglNRzCJPn1724852001.png"], "explanation_images": ["https://image.prepladder.com/content/4OcJHHiOvUKb6Ed3gh7d1724852049.png"], "explanation": "<p>Correct Option A – A\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are immunohistochemical markers for GIST, except?", "options": [{"label": "A", "text": "PDGFR Beta", "correct": false}, {"label": "B", "text": "SDH", "correct": false}, {"label": "C", "text": "KIT", "correct": false}, {"label": "D", "text": "NRG-1", "correct": true}], "correct_answer": "D. NRG-1", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In contrast with Ulcerative colitis, which of the following is Crohn's disease is likely to show?", "options": [{"label": "A", "text": "Seldom presents with daily hematochezia", "correct": false}, {"label": "B", "text": "Increased frequency of perianal fistula", "correct": true}, {"label": "C", "text": "Continuous lesion", "correct": false}, {"label": "D", "text": "Increased risk of colon cancer", "correct": false}], "correct_answer": "B. Increased frequency of perianal fistula", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Increased frequency of <span class=\"customMeta\" data-dictid=\"fb89fe7db116927771957d22da5a71\">perianal</span> fistu\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Crohn Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Ulcerative Colitis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bowel region</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Ileum ± colon</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Colon only</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Distribution</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Skip lesions</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Continuous lesions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Stricture</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Yes</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Rare</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Wall appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Thick</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Perianal fistula</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Yes (in <span class=\"customMeta\" data-dictid=\"566fcef0991692777184068f36db82\">colonic</span> disease)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>No</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Fat/vitamin malabsorption</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Yes</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>No</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Malignant potential</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>With <span class=\"customMeta\" data-dictid=\"566fcef0991692777184068f36db82\">colonic</span> involvement</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Yes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Recurrence after surgery</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Common</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>No</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Toxic megacolon</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>No</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Yes</p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following intestinal pathologies is associated with dermatitis herpetiformis?", "options": [{"label": "A", "text": "Ulcerative colitis", "correct": false}, {"label": "B", "text": "Whipple’s disease", "correct": false}, {"label": "C", "text": "Celiac disease", "correct": true}, {"label": "D", "text": "Crohn’s disease", "correct": false}], "correct_answer": "C. Celiac disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/9VyR0tkH6Xg7MU7aRxM91747377345.png", "https://image.prepladder.com/content/QpLYlktlxHWpqLUO10HQ1747224850.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black\">\n<p style=\"text-align:center\"><strong>Celiac Disease </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Definition </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Autoimmune disorder <span class=\"customMeta\" data-dictid=\"3978e9614f1692777200abbe4cfa34\">triggered</span> by ingesting gluten-containing foods in genetically <span class=\"customMeta\" data-dictid=\"55691242bb1692777199360f64cb67\">susceptible</span> individuals.</p>\n<p>It is influenced by <strong>HLA-DQ2 or HLA-DQ8. </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Pathogenesis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"650\" src=\"https://image.prepladder.com/content/9VyR0tkH6Xg7MU7aRxM91747377345.png\" width=\"650\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Adults:</strong></p>\n<ul>\n<li>Commonly between the ages of 30 and 60.</li>\n<li>More frequent in females</li>\n<li>Silent <span class=\"customMeta\" data-dictid=\"c2b5c161b71692777184c75775751a\">celiac</span> disease (positive <span class=\"customMeta\" data-dictid=\"6cffb1ffdd1692777198f0c11de8fe\">serology</span> and <span class=\"customMeta\" data-dictid=\"838d2bdb8516927772023871643ffb\">villous</span> <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> without symptoms)</li>\n<li>Latent <span class=\"customMeta\" data-dictid=\"c2b5c161b71692777184c75775751a\">celiac</span> disease (positive <span class=\"customMeta\" data-dictid=\"6cffb1ffdd1692777198f0c11de8fe\">serology</span> is not accompanied by <span class=\"customMeta\" data-dictid=\"838d2bdb8516927772023871643ffb\">villous</span> atrophy)</li>\n<li>It may be associated with chronic diarrhoea, bloating, chronic fatigue, or asymptomatic.</li>\n<li>Anaemia (iron and vitamin malabsorption).</li>\n<li>Dermatitis herpetiformis (itchy, blistering skin lesion) might be present. <strong>(Option C)</strong></li>\n</ul>\n<p> </p>\n<p><strong>Pediatric cases: </strong></p>\n<ul>\n<li>Both sexes were affected equally.</li>\n<li>It may present with malabsorption.</li>\n<li>Begins after the introduction of <span class=\"customMeta\" data-dictid=\"29771deef31692777188c19fb41999\">gluten</span> to the diet (6-24 months of age)</li>\n<li>Manifestations include irritability, <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> distention, anorexia, chronic diarrhoea, failure to thrive, weight loss, or muscle wasting.</li>\n<li>It may also present as <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> pain, nausea, vomiting, bloating, or constipation.</li>\n<li>Extraintestinal complaints include <span class=\"customMeta\" data-dictid=\"6f74c7bfe0169277718240005b59d1\">arthritis</span> or joint pain, <span class=\"customMeta\" data-dictid=\"c267cc6e5716927771818c84304bbe\">aphthous</span> stomatitis, iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia, delayed puberty, and short stature.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Serum markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>IgA antibodies against tissue <span class=\"customMeta\" data-dictid=\"4a47b71b801692777200d06df00a08\">transglutaminase</span> (tTG):</strong> <strong>Most sensitive.</strong></li>\n<li><strong>Anti-endomysial antibodies (EMA):</strong><strong> Most specific. </strong></li>\n<li>IgG antibodies against <span class=\"customMeta\" data-dictid=\"21f6d7d8df1692777188deb1006c47\">gliadin</span> (a component of gluten).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Biopsy of the second part of the <span class=\"customMeta\" data-dictid=\"280e59e9331692777186f3beac2c41\">duodenum</span> or <span class=\"customMeta\" data-dictid=\"bdbac654081692777196f9aab116f0\">proximal</span> jejunum:</p>\n<ul>\n<li>Increased <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> <strong>CD8+ T lymphocytes</strong> (intraepithelial lymphocytosis).</li>\n<li><strong>Crypt hyperplasia</strong> (Increased mitosis).</li>\n<li><strong>Villous atrophy</strong> (Reduced mucosal surface area, causing malabsorption).</li>\n<li>Inflammatory cell infiltration.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following diet is not advised in celiac sprue disease?", "options": [{"label": "A", "text": "Rice", "correct": false}, {"label": "B", "text": "Wheat", "correct": true}, {"label": "C", "text": "Dhal", "correct": false}, {"label": "D", "text": "Ragi", "correct": false}], "correct_answer": "B. Wheat", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Wh\n<table>\n<tbody>\n<tr>\n<td>Definition</td>\n<td>Celiac disease, also known as <span class=\"customMeta\" data-dictid=\"c2b5c161b71692777184c75775751a\">celiac</span> <span class=\"customMeta\" data-dictid=\"15ba4af6a9169277719905f80d2b20\">sprue</span> disease, is an <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> disorder in which the <span class=\"customMeta\" data-dictid=\"eba893313f16927771906290ce7e79\">ingestion</span> of gluten, a protein found in wheat, barley, and rye, triggers an <span class=\"customMeta\" data-dictid=\"dc6add5cf91692777189b30a6bae38\">immune response</span> that damages the lining of the small intestine.</td>\n</tr>\n<tr>\n<td>Prevalence</td>\n<td>Celiac disease is relatively common, with a global <span class=\"customMeta\" data-dictid=\"f86aae0bd61692777196f91458c9dd\">prevalence</span> estimated at around 1% of the population.</td>\n</tr>\n<tr>\n<td>Symptoms</td>\n<td>- <span class=\"customMeta\" data-dictid=\"b3a647ce2516927771881427f56c1d\">Gastrointestinal</span> symptoms: Diarrhea, <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> pain, bloating, and constipation. - Non-gastrointestinal symptoms: Fatigue, anemia, <span class=\"customMeta\" data-dictid=\"fedc53b3161692777186553c8f8d7d\">dermatitis</span> herpetiformis (skin rash), joint pain, and neurological symptoms.</td>\n</tr>\n<tr>\n<td>Diagnosis</td>\n<td>- Blood tests: Anti-tissue <span class=\"customMeta\" data-dictid=\"4a47b71b801692777200d06df00a08\">transglutaminase</span> (tTG) antibodies, anti-endomysial antibodies (EMA), and anti-deamidated <span class=\"customMeta\" data-dictid=\"21f6d7d8df1692777188deb1006c47\">gliadin</span> <span class=\"customMeta\" data-dictid=\"53172b32401692777195efbbb6b2e8\">peptide</span> (DGP) antibodies. - Small <span class=\"customMeta\" data-dictid=\"7840cca3ed16927771901d2f6cb32b\">intestine</span> biopsy: The gold standard for diagnosis, showing characteristic <span class=\"customMeta\" data-dictid=\"838d2bdb8516927772023871643ffb\">villous</span> <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> and inflammation. - Genetic testing: HLA-DQ2 and HLA-DQ8 testing can be supportive but not diagnostic.</td>\n</tr>\n<tr>\n<td>Treatment</td>\n<td>A strict <span class=\"customMeta\" data-dictid=\"e4cd865af41692777188fd3bf1aee5\">gluten-free diet</span> is the primary treatment for <span class=\"customMeta\" data-dictid=\"c2b5c161b71692777184c75775751a\">celiac</span> disease. This involves avoiding all sources of gluten, including wheat, barley, and rye.</td>\n</tr>\n<tr>\n<td>Complications</td>\n<td>- <span class=\"customMeta\" data-dictid=\"819ebcc6691692777191f968d41a03\">Malabsorption</span> of nutrients: <span class=\"customMeta\" data-dictid=\"c2b5c161b71692777184c75775751a\">Celiac</span> disease can lead to nutrient deficiencies, including iron, calcium, and vitamins. - Osteoporosis: Due to impaired <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> absorption. - <span class=\"customMeta\" data-dictid=\"fedc53b3161692777186553c8f8d7d\">Dermatitis</span> herpetiformis: A chronic skin condition associated with <span class=\"customMeta\" data-dictid=\"c2b5c161b71692777184c75775751a\">celiac</span> disease. - Increased risk of associated <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> disorders.</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a sensitive and specific marker of intestinal inflammation?", "options": [{"label": "A", "text": "Procalcitonin", "correct": false}, {"label": "B", "text": "Fecal lactoferrin", "correct": true}, {"label": "C", "text": "Tissue transglutaminase IgA", "correct": false}, {"label": "D", "text": "High-sensitivity C-reactive protein", "correct": false}], "correct_answer": "B. Fecal lactoferrin", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 17-year-old boy presented with intussusception and was taken up for surgery. He was found to have multiple polyps. The resected section was sent for histopathology, and the whole mount image of the specimen is given below. Identify the lesion.", "options": [{"label": "A", "text": "Tubulovillous adenoma", "correct": false}, {"label": "B", "text": "Hamartomatous polyp", "correct": true}, {"label": "C", "text": "Adenocarcinoma", "correct": false}, {"label": "D", "text": "Hyperplastic polyp", "correct": false}], "correct_answer": "B. Hamartomatous polyp", "question_images": ["https://image.prepladder.com/notes/72BRnaEknoVQC0izSODz1745315223.png"], "explanation_images": ["https://image.prepladder.com/notes/xrO9aEMyIkWfjvJZTZsB1745315369.png", "https://image.prepladder.com/notes/oOUGQ7VkQbKFepH95miD1745315474.png", "https://image.prepladder.com/notes/VUJ6qCqHeEsEvKmL1REN1747054909.jpg", "https://image.prepladder.com/notes/xz0A31UBYcRRKhT6tYd31747054949.png", "https://image.prepladder.com/notes/ndf9lBLofWKYiTogDFtk1745315573.png"], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Features</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Peutz-Jeghers syndrome (PJS)</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Juvenile <span class=\"customMeta\" data-dictid=\"fe6b8df2fa1692777196938c42762a\">polyposis</span> syndrome (JPS)</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Inheritance pattern</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Autosomal dominant disorder</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Autosomal dominant inheritance</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Age</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Presents around 11 years of age</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Primarily affects children under 5 years old.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Features</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Caused by a loss of function <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> in the STK11 gene </li>\n<li>Characterized by:</li>\n</ul>\n<ul>\n<li>Gastrointestinal <span class=\"customMeta\" data-dictid=\"d10905c64d1692777188b6730d6517\">hamartomatous</span> polyps, especially in the small intestine</li>\n<li>Mucocutaneous <span class=\"customMeta\" data-dictid=\"30261213bf16927771898b5d2f245d\">hyperpigmentation</span> (macules on lips, nostrils, <span class=\"customMeta\" data-dictid=\"d72626dd5c1692777183f1c92b2deb\">buccal</span> mucosa, and extremities).</li>\n</ul>\n<ul>\n<li>Polyps are large, pedunculated, and lobulated.</li>\n</ul>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Can be <span class=\"customMeta\" data-dictid=\"a325d0c14e16927771992fe8a96758\">sporadic</span> or syndromic.</li>\n</ul>\n<ul>\n<li>Sporadic: Single polyps.</li>\n<li>Syndromic: 3-100 polyps.</li>\n</ul>\n<ul>\n<li>Linked to mutations in the SMAD4 and BMPR1A genes, part of the TGF-β signalling pathway.</li>\n<li>Pedunculated polyp, which is usually less than 3 cm in diameter.</li>\n<li>Extra-intestinal manifestations include <span class=\"customMeta\" data-dictid=\"488a4efe7d16927771840c9e29f164\">congenital</span> malformations and digital clubbing. </li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\">Microscopy</td>\n<td colspan=\"1\">\n<p>An arborizing pattern of smooth muscle and glands lined by normal epithelium.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image3\" data-author=\"Nephron\" data-hash=\"10950\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Gastric_Peutz-Jeghers_polyp_-_low_mag.jpg\" data-tags=\"April2025\" height=\"444\" src=\"https://image.prepladder.com/notes/xrO9aEMyIkWfjvJZTZsB1745315369.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td colspan=\"1\">\n<p>Contains <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> spaces filled with <span class=\"customMeta\" data-dictid=\"7d30ef9aee16927771936bdac2c1ff\">mucin</span> and <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> debris.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image2\" data-author=\"DRdoubleB\" data-hash=\"10951\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:JuvenilePolyp.JPG\" data-tags=\"April2025\" height=\"248\" src=\"https://image.prepladder.com/notes/oOUGQ7VkQbKFepH95miD1745315474.png\" width=\"409\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>Classification of Colorectal Polyps</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Neoplastic Polyps</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Non-Neoplastic Polyps</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Adenomatous Polyps (Adenomas)</p>\n<ul>\n<li>Tubular</li>\n<li>Villous</li>\n<li>Tubulovillous</li>\n</ul>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Inflammatory Polyps</p>\n<p>Associated with <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> <span class=\"customMeta\" data-dictid=\"37863e7aec169277718310f33c6a11\">bowel</span> disease (e.g., Crohn's disease, <span class=\"customMeta\" data-dictid=\"b118cf61a016927772018a179057ef\">ulcerative</span> colitis)</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Serrated Polyps</p>\n<ul>\n<li>Hyperplastic Polyps</li>\n<li>Sessile Serrated Adenomas (SSA/Ps)</li>\n<li>Traditional Serrated Adenomas (TSAs)</li>\n</ul>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Hamartomatous Polyps</p>\n<ul>\n<li>Juvenile Polyps: Usually in children, generally <span class=\"customMeta\" data-dictid=\"1bbae82f1f16927771824f797639fa\">benign</span> but associated with Juvenile Polyposis Syndrome.</li>\n</ul>\n<ul>\n<li>Peutz-Jeghers Polyps: Associated with Peutz-Jeghers syndrome, characterized by <span class=\"customMeta\" data-dictid=\"b5f46d7e431692777195efd6b43e9f\">pigmentation</span> around the mouth.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>-</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Lymphoid Polyps</p>\n<p>It is composed of <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> tissue, usually <span class=\"customMeta\" data-dictid=\"1bbae82f1f16927771824f797639fa\">benign</span> and associated with the immune response</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following can be given to a celiac disease patient?", "options": [{"label": "A", "text": "Rye", "correct": false}, {"label": "B", "text": "Wheat", "correct": false}, {"label": "C", "text": "Quinoa", "correct": true}, {"label": "D", "text": "Barley", "correct": false}], "correct_answer": "C. Quinoa", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Qu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following antibodies is present in celiac disease?", "options": [{"label": "A", "text": "Tissue transglutaminase IgA (tTG IgA)", "correct": false}, {"label": "B", "text": "Endomysial IgA", "correct": false}, {"label": "C", "text": "Reticulin IgA", "correct": false}, {"label": "D", "text": "All of the above", "correct": true}], "correct_answer": "D. All of the above", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The distal ileum was removed from a 20-year-old girl. Which absorption deficiency will be seen?", "options": [{"label": "A", "text": "Iron", "correct": false}, {"label": "B", "text": "Folic acid", "correct": false}, {"label": "C", "text": "Copper", "correct": false}, {"label": "D", "text": "Bile salts", "correct": true}], "correct_answer": "D. Bile salts", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">Bile</span&g\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Intestine part resected</strong></td>\n<td style=\"text-align:center\"><strong>Complications</strong></td>\n</tr>\n<tr>\n<td><strong>Duodenum</strong></td>\n<td>\n<ul>\n<li>Delayed <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> emptying</li>\n<li>Bile <span class=\"customMeta\" data-dictid=\"def94cc96d16927771970d1a5cfb71\">reflux</span> gastritis</li>\n<li>Malabsorption of iron</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>Jejunum</strong></td>\n<td>\n<ul>\n<li>Malabsorption of various nutrients, including carbohydrates, proteins, fats, vitamins, and minerals</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>Ileum</strong></td>\n<td>\n<ul>\n<li>Malabsorption of vitamin B12</li>\n<li>Impaired <span class=\"customMeta\" data-dictid=\"3086fd09371692777197a351ddde07\">reabsorption</span> of <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> salts</li>\n<li>Malabsorption of <span class=\"customMeta\" data-dictid=\"8ddb9380a816927772028a1805805e\">fat-soluble vitamins</span> (A, D, E, and K)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>Colon</strong></td>\n<td>\n<ul>\n<li>Diarrhea (loose stools)</li>\n<li>Increased water content in the stool</li>\n<li>Electrolyte imbalances</li>\n<li>Impaired <span class=\"customMeta\" data-dictid=\"5fcb9396d1169277718069dd7fa788\">absorption</span> of water, sodium, and potassium</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Whipple's disease is caused by:", "options": [{"label": "A", "text": "Bacteria", "correct": true}, {"label": "B", "text": "Virus", "correct": false}, {"label": "C", "text": "Protozoa", "correct": false}, {"label": "D", "text": "Helminths", "correct": false}], "correct_answer": "A. Bacteria", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/rAVriQHVYNtsfztEUr6P1713769201.png"], "explanation": "<p>Correct Option A - B\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Punched-out ulcers in the esophagus are caused by which of the following?", "options": [{"label": "A", "text": "Herpes simplex virus", "correct": true}, {"label": "B", "text": "Cytomegalovirus", "correct": false}, {"label": "C", "text": "Candida", "correct": false}, {"label": "D", "text": "Gastric acid", "correct": false}], "correct_answer": "A. Herpes simplex virus", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"e502fd2a6816927771880ae17fc163\">Herpes</span> simplex viru\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td><strong>HSV esophagitis</strong></td>\n<td>Shallow, well-demarcated ulcers with a <span class=\"customMeta\" data-dictid=\"7134f7f8681692777196fa644c43bf\">punched-out</span> appearance</td>\n</tr>\n<tr>\n<td><strong>CMV esophagitis</strong></td>\n<td>Linear or linearly arranged shallow ulcers</td>\n</tr>\n<tr>\n<td><strong>Candida esophagitis</strong></td>\n<td>Raised, white plaques or pseudomembranes</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All is true about the Barrett oesophagus , except ?", "options": [{"label": "A", "text": "Complication of chronic GERD", "correct": false}, {"label": "B", "text": "Seen in 10% of individuals with symptomatic GERD", "correct": false}, {"label": "C", "text": "Increases risk of squamous cell carcinoma", "correct": true}, {"label": "D", "text": "Intestinal metaplasia", "correct": false}], "correct_answer": "C. Increases risk of squamous cell carcinoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Increases the risk of <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which one of the subsequent options pertains to a stomach tumor present with acanthosis nigricans?", "options": [{"label": "A", "text": "Carcinoid tumor", "correct": false}, {"label": "B", "text": "Lymphoma", "correct": false}, {"label": "C", "text": "Gastrointestinal stromal tumor", "correct": false}, {"label": "D", "text": "Gastric adenocarcinoma", "correct": true}], "correct_answer": "D. Gastric adenocarcinoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">Gastric</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Cowden syndrome is associated with mutations in:", "options": [{"label": "A", "text": "PTEN", "correct": true}, {"label": "B", "text": "WT1", "correct": false}, {"label": "C", "text": "p53", "correct": false}, {"label": "D", "text": "RAS", "correct": false}], "correct_answer": "A. PTEN", "question_images": [], "explanation_images": [], "explanation": "<p>Correct option A: PTEN\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 42 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "In a community where consanguineous marriages are prevalent, a distant relative couple decide to get married. They later have a child who presents with symptoms of anaemia and requires regular blood transfusions. Further investigation reveals that the child has beta-thalassemia, a genetic disorder prevalent in the region. Which of the following symbols can be anticipated in this couple, which is a risk factor for this disease?", "options": [{"label": "A", "text": "A", "correct": false}, {"label": "B", "text": "B", "correct": true}, {"label": "C", "text": "C", "correct": false}, {"label": "D", "text": "D", "correct": false}], "correct_answer": "B. B", "question_images": ["https://image.prepladder.com/content/veL2k1ldiPhGHGYbFmem1736825441.png"], "explanation_images": ["https://image.prepladder.com/content/k8RkT4qcUVKIV0CEwy1h1736826072.png", "https://image.prepladder.com/content/tyx4oIwyoYvpwhy8ls2B1736825640.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ZHNzGHm0TAs4LG0cNuiK1748355310.mp3", "video": ""}, {"text": "A couple seeks medical advice after their daughter presents with frequent nosebleeds and easy bruising. Lab investigations reveal prolonged bleeding time, prolonged aPTT, and a normal PT. A detailed history and a pedigree analysis were obtained, suspecting a genetic disorder. Based on the pedigree chart, what is this condition's most likely inheritance pattern?", "options": [{"label": "A", "text": "Autosomal recessive", "correct": false}, {"label": "B", "text": "Autosomal dominant", "correct": true}, {"label": "C", "text": "X linked recessive", "correct": false}, {"label": "D", "text": "X linked dominant", "correct": false}], "correct_answer": "B. Autosomal dominant", "question_images": ["https://image.prepladder.com/content/2epnyIHdn7oKI8k5ZDgH1736826163.png"], "explanation_images": ["https://image.prepladder.com/content/rmOwLpzLVgRjDMrGnsQN1736826192.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:608px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mnemonic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>He</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>H</strong>ereditary spherocytosis</li>\n<li><strong>H</strong>ereditary hemorrhagic telangiectasia</li>\n<li><strong>H</strong>ereditary non-polyposis <span class=\"customMeta\" data-dictid=\"f04bf2125316927771847bfe139191\">colorectal</span> cancer (HNPCC/Lynch syndrome)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Has</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>H</strong>untington’s disease</li>\n<li><strong>H</strong>ypertrophic cardiomyopathy</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>A</strong>utosomal dominant <span class=\"customMeta\" data-dictid=\"ba336eb30516927771960f9d9bd85c\">polycystic</span> <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">kidney</span> disease</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Very</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Von Willebrand disease</strong></li>\n<li><strong>V</strong>on <span class=\"customMeta\" data-dictid=\"a5053b37c2169277718910a0dcc85a\">Hippel</span> Lindau syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dominant</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>D</strong>ystonia myotonica</li>\n<li><strong>O</strong>steogenesis imperfecta</li>\n<li><strong>M</strong>arfan’s syndrome</li>\n<li><strong>I</strong>ntermittent porphyria</li>\n<li><strong>N</strong>F-1 & 2</li>\n<li><strong>A</strong>chondroplasia</li>\n<li><strong>N</strong>oonan syndrome</li>\n<li><strong>T</strong>uberous sclerosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Powerful</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>P</strong>seudohypoparathyroidism</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Father</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>F</strong>amilial <span class=\"customMeta\" data-dictid=\"bf1f32fbd81692777180c0d2485ab2\">adenomatous</span> polyposis</li>\n<li>Li <strong>F</strong>raumeni syndrome</li>\n<li><strong>F</strong>amilial hypercholesterolemia</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/nsoXGCwYnNrOfxqkns4P1746450126.mp3", "video": ""}, {"text": "A 10-year-old boy presents to the clinic with complaints of unsteady gait and frequent falls. Upon further inquiry, it is revealed that he has experienced progressive difficulty with coordination and balance over the past few years. His parents report a similar history in his older sister, who is now 15 years old. Interestingly, the parents are both asymptomatic, but the boy's maternal uncle was diagnosed with a similar condition in his late 20s. What is the most likely inheritance pattern seen in this condition?", "options": [{"label": "A", "text": "Autosomal Dominant", "correct": false}, {"label": "B", "text": "X linked dominant", "correct": false}, {"label": "C", "text": "X linked recessive", "correct": false}, {"label": "D", "text": "Autosomal Recessive", "correct": true}], "correct_answer": "D. Autosomal Recessive", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/KPrN1K8Tm8HyitTzwksZ1736826368.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mnemonic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pasta</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>P</strong>henylketonuria</li>\n<li><strong>A</strong>lkaptonuria</li>\n<li><strong>S</strong>ickle cell anemia</li>\n<li><strong>T</strong>halassemi<strong>a</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fried</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>F</strong>riedrich’s ataxia:</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chawal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>C</strong>ystic fibrosis, <strong>C</strong>ongenital <span class=\"customMeta\" data-dictid=\"f955f012f716927771801d01e7d163\">adrenal</span> hyperplasia</li>\n<li><strong>H</strong>emophilia C, <strong>H</strong>omocystinuria, <strong>H</strong>emochromatosis</li>\n<li><strong>A</strong>lpha-1-antitrypsin deficiency</li>\n<li><strong>W</strong>ilson’s disease</li>\n<li><strong>A</strong>lbinism</li>\n<li><strong>L</strong>ysosomal storage disorders, g<strong>l</strong>ycogen storage disorders</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>DNA repair defects</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Big</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>B</strong>loom syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fax</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>F</strong>anconi’s anemia</li>\n<li><strong>A</strong>taxia telangiectasia</li>\n<li><strong>X</strong>eroderma pigmentosum</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/oblQGnCAyjAedTFYCttO1747209527.mp3", "video": ""}, {"text": "A 6-year-old boy presents to the clinic with complaints of muscle weakness and difficulty walking. His parents report a family history of similar symptoms. A detailed history was obtained, and a pedigree analysis was done, which is shown below. What is the most likely diagnosis and the inheritance pattern seen in this condition?", "options": [{"label": "A", "text": "Dystonia myotonica, autosomal dominant", "correct": false}, {"label": "B", "text": "Dystonia myotonica, X-linked recessive", "correct": false}, {"label": "C", "text": "Duchenne muscular dystrophy, autosomal recessive", "correct": false}, {"label": "D", "text": "Duchenne muscular dystrophy, X-linked recessive", "correct": true}], "correct_answer": "D. Duchenne muscular dystrophy, X-linked recessive", "question_images": ["https://image.prepladder.com/content/eFWxdPoQyZm57EHLNk8F1736826486.png"], "explanation_images": ["https://image.prepladder.com/content/WrD1WIEfJgDskM5Qag291736826522.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mnemonic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diseases</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Wise</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Wiskott-Aldrich syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AB</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hemophilia A, B</li>\n<li>Ocular albinism</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Bruton’s agammaglobulinemia</li>\n<li>Becker <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> dystrophy</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Chronic <span class=\"customMeta\" data-dictid=\"9e1f97f6ad169277718805c2dd35c1\">granulomatous</span> disease</li>\n<li>Color <span class=\"customMeta\" data-dictid=\"cf284485b71692777183c57876bed2\">blindness</span> (Red-green)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>D</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Duchenne <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">Muscular</span> dystrophy</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>E</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Lesch Nyhan syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>F</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Fabry disease</li>\n<li>Fragile-X syndrome (X-linked <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> > <span class=\"customMeta\" data-dictid=\"dd35346fc716927772029e2f0bb10f\">X-linked</span> recessive)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>G</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>G-6-PD deficiency</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>H</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hunter’s disease</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/WhgSO7wRMn4MEkM53Pub1748355591.mp3", "video": ""}, {"text": "In which of the following conditions can you see this pedigree chart?", "options": [{"label": "A", "text": "Fabry disease", "correct": false}, {"label": "B", "text": "Albinism", "correct": false}, {"label": "C", "text": "Reye syndrome", "correct": false}, {"label": "D", "text": "Alport syndrome", "correct": true}], "correct_answer": "D. Alport syndrome", "question_images": ["https://image.prepladder.com/content/2Gx5FnuC6qHonoMTcuBE1737458368.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/S66OJyV2jmQw45Uf2go21748355840.mp3", "video": ""}, {"text": "Hairy pinna is associated with which type of Mendelian inheritance?", "options": [{"label": "A", "text": "Autosomal dominant", "correct": false}, {"label": "B", "text": "X-linked recessive", "correct": false}, {"label": "C", "text": "Mitochondrial inheritance", "correct": false}, {"label": "D", "text": "Y-linked inheritance", "correct": true}], "correct_answer": "D. Y-linked inheritance", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/btNeutDMDznHUBMKb4j81737458679.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/YisH7u8iyWNNDZXh3Jbs1748355957.mp3", "video": ""}, {"text": "A 25-year-old male has been complaining of painless, progressive central vision loss in both eyes over the past few months. He reports a family history of similar visual problems, with his maternal grandfather and maternal uncle experiencing sudden vision loss in their 20s. On examination, the ophthalmologist notes bilateral optic disc pallor and central scotomas on visual field testing. The patient denies any systemic symptoms or significant medical history. What is the inheritance pattern seen in this condition?", "options": [{"label": "A", "text": "No options available", "correct": false}], "correct_answer": "Unknown", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/WjAgNRjASZkBcf48Bffg1748366638.mp3", "video": ""}, {"text": "Which of the following statements regarding gonadal mosaicism is true?", "options": [{"label": "A", "text": "It is associated with autosomal recessive disorders.", "correct": false}, {"label": "B", "text": "It occurs due to a pre-zygotic mutation during early embryonic development.", "correct": false}, {"label": "C", "text": "It can be associated with osteogenesis imperfecta.", "correct": true}, {"label": "D", "text": "It follows the laws of Mendelian inheritance.", "correct": false}], "correct_answer": "C. It can be associated with osteogenesis imperfecta.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/SmLl39UPLvIF9KKHbGoQ1748367037.mp3", "video": ""}, {"text": "A 45-year-old woman has been newly diagnosed with breast cancer. Histopathological analysis of the tumour reveals invasive ductal carcinoma. Given the aggressive nature of her tumour, the oncologist wants to determine if the patient's cancer is HER2-positive. Which diagnostic method is most appropriate for detecting HER2/neu amplification in this patient?", "options": [{"label": "A", "text": "Immunohistochemistry (IHC)", "correct": false}, {"label": "B", "text": "Fluorescence In Situ Hybridization (FISH)", "correct": true}, {"label": "C", "text": "Polymerase Chain Reaction (PCR)", "correct": false}, {"label": "D", "text": "Western Blotting", "correct": false}], "correct_answer": "B. Fluorescence In Situ Hybridization (FISH)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/vUPRLbcaegcmA1oineqe1736827536.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/26GPaXrm6No2Y8DqgxOG1748367307.mp3", "video": ""}, {"text": "A 35-year-old pregnant woman presents for prenatal screening due to advanced maternal age. She undergoes amniocentesis, and chromosome analysis is performed on the fetal cells to assess for chromosomal abnormalities . The results indicate Down syndrome. From the below chromosomal analysis, which of the following results is most likely associated with this case?", "options": [{"label": "A", "text": "No options available", "correct": false}], "correct_answer": "Unknown", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/o5Mz4LBekgFM73qyiVAu1736828763.png", "https://image.prepladder.com/content/pzqceYh7ZyYzMi0MRK8L1737457273.png", "https://image.prepladder.com/content/L7IY9DWhv1kO8DE2RhAx1737457128.png", "https://image.prepladder.com/content/cBQW537osTuYW0cLx8eg1737457035.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/hJvVpCWRi78mB2w55gNI1748367477.mp3", "video": ""}, {"text": "In a cytogenetics laboratory, a technician is tasked with preparing chromosomes obtained from a patient's blood sample for analysis under a light microscope. The patient has been experiencing unexplained developmental delays, and the physician suspects a potential chromosomal abnormality. To aid in the identification and analysis of individual chromosomes, which technique will the technician employ to produce distinct banding patterns?", "options": [{"label": "A", "text": "G-banding", "correct": true}, {"label": "B", "text": "C-banding", "correct": false}, {"label": "C", "text": "Q-banding", "correct": false}, {"label": "D", "text": "R-banding", "correct": false}], "correct_answer": "A. G-banding", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/qQqEPjvJseoi5BcqvqIX1748367640.mp3", "video": ""}, {"text": "Which steps are NOT involved in the Polymerase Chain Reaction (PCR) process?", "options": [{"label": "A", "text": "Denaturation", "correct": false}, {"label": "B", "text": "Annealing", "correct": false}, {"label": "C", "text": "Amplification", "correct": false}, {"label": "D", "text": "Ligation", "correct": true}], "correct_answer": "D. Ligation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/xkBivYOZDdG2ZcGb6RgV1748367845.mp3", "video": ""}, {"text": "A 35-year-old female undergoes genetic testing due to a family history of Cystic Fibrosis. The test reveals a suspected deletion in the CFTR gene. Which technique is most suitable for confirming large deletions or duplications in the CFTR gene?", "options": [{"label": "A", "text": "Polymerase Chain Reaction (PCR)", "correct": false}, {"label": "B", "text": "Comparative Genomic Hybridization (CGH)", "correct": false}, {"label": "C", "text": "Multiplex Ligation Dependent Probe Amplification (MLPA)", "correct": true}, {"label": "D", "text": "Sanger sequencing", "correct": false}], "correct_answer": "C. Multiplex Ligation Dependent Probe Amplification (MLPA)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/TfQsQKAypwFzhjOkgRFc1748367992.mp3", "video": ""}, {"text": "A researcher wants to analyze gene expression levels in a sample using a PCR technique that quantifies the amount of DNA produced after each amplification cycle. Which type of PCR is most suitable for this purpose?", "options": [{"label": "A", "text": "Real-time PCR", "correct": true}, {"label": "B", "text": "Nested PCR", "correct": false}, {"label": "C", "text": "Reverse Transcription PCR (RT-PCR)", "correct": false}, {"label": "D", "text": "Multiplex PCR", "correct": false}], "correct_answer": "A. Real-time PCR", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Type of PCR</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Characteristics</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Real-time <span class=\"customMeta\" data-dictid=\"fa67319b42169277719498abc93db6\">PCR</span> (qPCR) (Option A)</strong></p>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Quantitative measurement of DNA <span class=\"customMeta\" data-dictid=\"13e14b31b21692777181520d7c651c\">amplification</span> in real-time.</li>\n<li>Allows for <span class=\"customMeta\" data-dictid=\"e90d7fdd7316927771880df273d8ef\">gene expression</span> analysis, <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> load determination, and <span class=\"customMeta\" data-dictid=\"ef5cb829b8169277719603304e73cb\">quantitative</span> DNA/RNA analysis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Nested <span class=\"customMeta\" data-dictid=\"fa67319b42169277719498abc93db6\">PCR</span> (Option B)</strong></p>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Two rounds of <span class=\"customMeta\" data-dictid=\"fa67319b42169277719498abc93db6\">PCR</span> <span class=\"customMeta\" data-dictid=\"13e14b31b21692777181520d7c651c\">amplification</span> using two sets of primers.</li>\n<li>Improves <span class=\"customMeta\" data-dictid=\"e70dd3ea9916927771988faba61d64\">specificity</span> and sensitivity compared to conventional PCR.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>PCR (RT-PCR) (Option C)</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Enables <span class=\"customMeta\" data-dictid=\"e90d7fdd7316927771880df273d8ef\">gene expression</span> analysis by amplifying <span class=\"customMeta\" data-dictid=\"cc65bdc03f169277719726a675e8a7\">RNA</span> targets.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Multiplex <span class=\"customMeta\" data-dictid=\"fa67319b42169277719498abc93db6\">PCR</span> (Option D)</strong></p>\n</td>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Simultaneous <span class=\"customMeta\" data-dictid=\"13e14b31b21692777181520d7c651c\">amplification</span> of multiple DNA targets in a single reaction.</li>\n<li>Reduces time and cost by amplifying multiple targets together.</li>\n<li>Highly accurate for determining <span class=\"customMeta\" data-dictid=\"e90d7fdd7316927771880df273d8ef\">gene expression</span> levels, <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> load, and <span class=\"customMeta\" data-dictid=\"061348eada16927771853267503805\">copy number</span> variations.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Digital PCR</strong></p>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Divides the sample into thousands of individual reactions, allowing for absolute quantification of DNA targets.</li>\n<li>Provides high <span class=\"customMeta\" data-dictid=\"55748e259a169277719699c6638990\">precision</span> and sensitivity for rare target detection.</li>\n<li>Used in rare <span class=\"customMeta\" data-dictid=\"88c5dcbf0a1692777181e199712f81\">allele</span> detection, <span class=\"customMeta\" data-dictid=\"061348eada16927771853267503805\">copy number</span> variation analysis, and precise quantification of nucleic acids.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hot Start PCR</strong></p>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Minimizes non-specific <span class=\"customMeta\" data-dictid=\"13e14b31b21692777181520d7c651c\">amplification</span> and primer-dimer formation by activating the <span class=\"customMeta\" data-dictid=\"59b270e4eb1692777186cf05589eda\">DNA polymerase</span> after an initial <span class=\"customMeta\" data-dictid=\"4b8ccd7c3516927771851fdaee3f80\">denaturation</span> step.</li>\n<li>Prevents background noise and <span class=\"customMeta\" data-dictid=\"b0151941a0169277720265b58da84e\">false-positive</span> results.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/CnEXjXPlilDxWlurj2ne1748369566.mp3", "video": ""}, {"text": "Arrange the following steps of karyotyping in the correct sequence: Staining/Banding Sample collection Fixative Arrangement of chromosomes Arrest Interpretation", "options": [{"label": "A", "text": "2, 5, 3, 1, 4, 6", "correct": true}, {"label": "B", "text": "2, 3, 5, 1, 4, 6", "correct": false}, {"label": "C", "text": "1, 2, 3, 5, 4, 6", "correct": false}, {"label": "D", "text": "3, 5, 2, 4, 1, 6", "correct": false}], "correct_answer": "A. 2, 5, 3, 1, 4, 6", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/WkgMgzEpPcDSRITsLHMh1737456509.png", "https://image.prepladder.com/content/NoS67fqdKzgGaEZJUOHF1737456370.png", "https://image.prepladder.com/content/QzIlhPaL2Q2lZACyrdiV1737456644.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:482px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Patient type </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sample type </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pregnant woman</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Amniocentesis</li>\n<li>Chorionic <span class=\"customMeta\" data-dictid=\"838d2bdb8516927772023871643ffb\">villous</span> sampling</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>10 year old boy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Lymphocyte blood sample (preferred)</li>\n<li>Fibroblast skin sample</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:668px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Trisomy 21</strong></p>\n<p>(Down’s syndrome)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"\" data-author=\"U.S. Department of Energy Human Genome Program.\" data-hash=\"\" data-license=\"open Source - Public Domain\" data-source=\"https://commons.wikimedia.org/wiki/File:21_trisomy_-_Down_syndrome.png\" data-tags=\"\" height=\"396\" src=\"https://image.prepladder.com/content/WkgMgzEpPcDSRITsLHMh1737456509.png\" width=\"500\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Trisomy 18</strong></p>\n<p>(Edwards syndrome)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"\" data-author=\"Serra Amoros\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Trisomy_18#/media/File:Trisomia_18.jpg\" data-tags=\"\" height=\"306\" src=\"https://image.prepladder.com/content/NoS67fqdKzgGaEZJUOHF1737456370.png\" width=\"500\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>47 XXY</strong></p>\n<p>(Klinefelter syndrome)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"\" data-author=\"Nami ja\" data-hash=\"\" data-license=\"Open Source - Public Domain\" data-source=\"https://en.wikipedia.org/wiki/Klinefelter_syndrome#/media/File:Human_chromosomesXXY01.png\" data-tags=\"\" height=\"369\" src=\"https://image.prepladder.com/content/QzIlhPaL2Q2lZACyrdiV1737456644.png\" width=\"500\"/></td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/nKs8tpD1fzRFHdZsnYE51748370086.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 25 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Match the following with their correct terms. 1 Exon i Non-coding region 2 Intron ii One of the alternate forms of a single gene occupying a given position in a chromosome 3 Locus iii Coding region 4 Allele iv Location of a gene on the chromosome", "options": [{"label": "A", "text": "1-iii, 2-i, 3-iv, 4-ii", "correct": true}, {"label": "B", "text": "1-iii, 2-i, 3-ii, 4-iv", "correct": false}, {"label": "C", "text": "1-i, 2-iii, 3-iv, 4-ii", "correct": false}, {"label": "D", "text": "1-i, 2-iii, 3-ii, 4-iv", "correct": false}], "correct_answer": "A. 1-iii, 2-i, 3-iv, 4-ii", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/3pHrzqbT0qdYPeSuOsbP1746448675.mp3", "video": ""}, {"text": "A 25-year-old male from a tribal area of Madhya Pradesh presents to the clinic with complaints of fatigue and shortness of breath. On examination, he appears pale, and jaundice is noted. Laboratory investigations reveal low hemoglobin levels and increased reticulocyte count. The peripheral blood smear shows numerous sickle-shaped erythrocytes. What is the most likely molecular mechanism underlying the pathogenesis of this patient's condition?", "options": [{"label": "A", "text": "Chromosomal translocation", "correct": false}, {"label": "B", "text": "Missense mutation", "correct": true}, {"label": "C", "text": "Frameshift mutation", "correct": false}, {"label": "D", "text": "Nonsense mutation", "correct": false}], "correct_answer": "B. Missense mutation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:600px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Missense mutation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It can be:</p>\n<ul>\n<li><strong>Sickle cell anaemia.</strong>\n<ul>\n<li>This point <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> involves substituting<strong> <span class=\"customMeta\" data-dictid=\"701cef29c216927771801e7d1a7c0f\">adenine</span> for <span class=\"customMeta\" data-dictid=\"1946ad8139169277720097cac9e8f5\">thymine</span> at the sixth <span class=\"customMeta\" data-dictid=\"3faf36c69716927771840561232eaa\">codon</span> of the β-globin gene (GAG to GTG)</strong>, replacing<strong> <span class=\"customMeta\" data-dictid=\"acfb68e3341692777188dea4dcdb1b\">glutamic acid</span> with valine</strong> in the β-globin chain of haemoglobin.</li>\n<li>This single <span class=\"customMeta\" data-dictid=\"94a2f0970016927771932885a3d362\">nucleotide</span> change results in the formation of <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> haemoglobin molecules <strong>(HbS)</strong>.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nonsense mutation</strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Change of an <span class=\"customMeta\" data-dictid=\"543f207eb51692777181723491a358\">amino</span> acid to a <strong>chain terminator</strong> or <strong>stop codon. (UAA, UGA, UAG)</strong></li>\n<li>Example: <span class=\"customMeta\" data-dictid=\"806eb8418c16927771822855b56695\">Beta</span> thalassemia\n\t\t\t\t<ul>\n<li>This change leads to <strong>premature termination</strong> of β-globin gene translation, and the short <span class=\"customMeta\" data-dictid=\"53172b32401692777195efbbb6b2e8\">peptide</span> that is produced is rapidly degraded.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/lLO5KYnBx3NCC7WvMhTt1747997340.mp3", "video": ""}, {"text": "A couple visits a genetics counselor due to concerns about their baby's blood type. The father has blood type A (genotype I A I A ), and the mother has blood type B (genotype I B I B ). The counselor explains that blood type is determined by codominant alleles, where both alleles contribute equally to the phenotype in the heterozygous condition. Which of the following best describes codominance?", "options": [{"label": "A", "text": "One allele completely masks the expression of the other allele", "correct": false}, {"label": "B", "text": "The phenotype of the heterozygote is intermediate between the phenotypes of the homozygotes", "correct": false}, {"label": "C", "text": "Only one allele is expressed, while the other remains silent", "correct": false}, {"label": "D", "text": "Both alleles contribute to the phenotype equally in the heterozygous condition", "correct": true}], "correct_answer": "D. Both alleles contribute to the phenotype equally in the heterozygous condition", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ABO <span class=\"customMeta\" data-dictid=\"a3c99b36b6169277718332b20cc393\">blood group</span> system</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>In the <span class=\"customMeta\" data-dictid=\"4bc84ee03c1692777180863d427fb5\">ABO blood group</span> system, the I<sup>A</sup> and I<sup>B</sup> alleles are <strong>codominant</strong> in producing the <span class=\"customMeta\" data-dictid=\"c087dfa48f1692777180b90ca2237f\">AB</span> <span class=\"customMeta\" data-dictid=\"a3c99b36b6169277718332b20cc393\">blood group</span> phenotype, in which both A and B-type antigens are produced.</li>\n<li>The genes responsible for the <span class=\"customMeta\" data-dictid=\"4bc84ee03c1692777180863d427fb5\">ABO blood group</span> are located in <strong>chromosome 9.</strong></li>\n<li>The <strong>presence of both I</strong><strong><sup>A</sup></strong><strong> and I</strong><strong><sup>B</sup></strong><strong> causes the expression of both</strong>, forming the <span class=\"customMeta\" data-dictid=\"c087dfa48f1692777180b90ca2237f\">AB</span> blood group.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/tpqaH6VFPLdaDIBcRIm91747997533.mp3", "video": ""}, {"text": "A 30-year-old man presents to the clinic with a history of tall stature, long limbs, and joint hypermobility. Upon further examination, he also exhibits features such as a high-arched palate, arachnodactyly (long, slender fingers), and aortic root dilation. His father has a similar appearance. Which of the following statements is true regarding the inheritance pattern seen in this condition?", "options": [{"label": "A", "text": "Males are more commonly affected than females.", "correct": false}, {"label": "B", "text": "Most mutations lead to reduced production of a gene product or give rise to a dysfunctional or inactive protein.", "correct": true}, {"label": "C", "text": "Complete penetrance can be seen", "correct": false}, {"label": "D", "text": "The least common mode of inheritance", "correct": false}], "correct_answer": "B. Most mutations lead to reduced production of a gene product or give rise to a dysfunctional or inactive protein.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/8tBLoEJPJO5T2nxXx8FQ1736907874.png", "https://image.prepladder.com/content/4szcuFv2pBwdWLyeYt4k1736907944.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/KXD60J0UWMpzckYX6BjU1748006508.mp3", "video": ""}, {"text": "A 6-month-old male infant presents to the pediatric clinic with failure to thrive, recurrent respiratory infections, and hepatosplenomegaly. Upon further examination, the infant also displays signs of skeletal abnormalities including bowed legs and frontal bossing. Lab investigations reveal pancytopenia with markedly decreased platelet count. Genetic testing confirms a diagnosis of Gaucher disease. What is the pattern of inheritance and underlying genetic defect leading to this disorder?", "options": [{"label": "A", "text": "Autosomal Dominant Inheritance, Mutation in the CFTR Gene", "correct": false}, {"label": "B", "text": "X-linked Recessive Inheritance, Mutation in the GBA Gene", "correct": false}, {"label": "C", "text": "Autosomal Dominant Inheritance, Mutation in the HEXA Gene", "correct": false}, {"label": "D", "text": "Autosomal Recessive Inheritance, Mutation in the GBA Gene", "correct": true}], "correct_answer": "D. Autosomal Recessive Inheritance, Mutation in the GBA Gene", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tgKpeHyNWii31YiNUa5H1737459895.png", "https://image.prepladder.com/content/YJ99dn2bSolpTGbCHJMt1737460082.png", "https://image.prepladder.com/content/h9fasDxNpZY8ZVyTe2CG1737460236.png", "https://image.prepladder.com/content/PbgXrvAgRlQOZJxg2IMZ1737460357.png", "https://image.prepladder.com/content/ZQCXNur79nD3mWv6MJpI1737460410.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:584px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>DISORDERS</strong></p>\n<p style=\"text-align:center\"><strong>(Pasta Fried Chawal/ Big Fax)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>P</strong>- Phenylketonuria</p>\n<p><strong>A</strong>- Alkaptonuria</p>\n<p><strong>S</strong>- Sickle Cell Anemia</p>\n<p><strong>Ta</strong>- Thalassemia</p>\n\t\t\t \n\n\t\t\t<p><strong>Fried</strong>- Friedreich's Ataxia</p>\n\t\t\t \n\n\t\t\t<p><strong>C</strong>- <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">Cystic</span> Fibrosis</p>\n<p><strong>H</strong>- <span class=\"customMeta\" data-dictid=\"904d77ba8a16927771882396edef7c\">Hemophilia</span> C, Homocystinuria, Hemochromatosis</p>\n<p><strong>A</strong>- <span class=\"customMeta\" data-dictid=\"a9268f2e1d16927771814cfef69cf4\">Alpha</span> 1 Antitrypsin Deficiency</p>\n<p><strong>W</strong>- Wilson Disease</p>\n<p><strong>A</strong>- Albinism, <span class=\"customMeta\" data-dictid=\"488a4efe7d16927771840c9e29f164\">Congenital</span> <span class=\"customMeta\" data-dictid=\"f955f012f716927771801d01e7d163\">Adrenal</span> Hyperplasia</p>\n<p><strong>L</strong>- Lysosomal Storage Disease, <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">Glycogen</span> Storage Disease</p>\n\t\t\t \n\n\t\t\t<p><strong>Big</strong>-Bloom Syndrome</p>\n<p><strong>Fa</strong>- Fanconi Anemia, <span class=\"customMeta\" data-dictid=\"0842a8a59f1692777182f44d334dda\">Ataxia</span> Telangiectasia</p>\n<p><strong>X</strong>- <span class=\"customMeta\" data-dictid=\"9983ab5c3016927772021e399ed902\">Xeroderma</span> Pigmentosum</p>\n\t\t\t \n\n\t\t\t<p><strong>(Big FAX)</strong> is also known as DNA repair defects</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Vv3EKyuSlNQoqAhrQ9Ml1748006734.mp3", "video": ""}, {"text": "A 6-month-old infant presents with hepatosplenomegaly, failure to thrive, and hypotonia. The infant has a cherry-red spot on the macula and exhibits poor startle reflexes on physical examination. Further evaluation reveals foam cells in the bone marrow. What is the diagnosis and associated enzyme deficiency?", "options": [{"label": "A", "text": "Diagnosis: Niemann-Pick disease type A, Enzyme Deficiency: Acid sphingomyelinase", "correct": true}, {"label": "B", "text": "Diagnosis: Tay-Sachs disease, Enzyme Deficiency: Hexosaminidase A", "correct": false}, {"label": "C", "text": "Diagnosis: Gaucher disease, Enzyme Deficiency: Glucocerebrosidase", "correct": false}, {"label": "D", "text": "Diagnosis: Metachromatic leukodystrophy, Enzyme Deficiency: Arylsulfatase A", "correct": false}], "correct_answer": "A. Diagnosis: Niemann-Pick disease type A, Enzyme Deficiency: Acid sphingomyelinase", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/sFqpBazNcH8zhMHi2heM1736908959.png", "https://image.prepladder.com/content/immNC6UA7zjKGFK7ixJX1736909053.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lysosomal Storage Disorders</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Enzyme</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Accumulated Substrate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tay-Sachs Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hexosaminidase A (α-subunit).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>GM2 gangliosides.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Motor and mental decline, <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> flaccidity.</li>\n<li>Blindness, dementia, and <span class=\"customMeta\" data-dictid=\"ebad8eb48c1692777191b5de5d04a1\">macular</span> cherry-red spot.</li>\n<li>Fatal by 2-3 years of age.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Niemann-Pick Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sphingomyelinase</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sphingomyelin.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Type A: Severe neurological damage, wasting, visceral <span class=\"customMeta\" data-dictid=\"7a5d0661261692777199584b7da30f\">sphingomyelin</span> accumulation; death in 3 years.</li>\n<li>Type B: <span class=\"customMeta\" data-dictid=\"71eef9375b16927771947c6853424e\">Organomegaly</span> without CNS involvement; survival into adulthood.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Niemann-Pick Disease Type C</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nonenzymatic <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> transport (NPC1, NPC2 proteins).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cholesterol, gangliosides.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Variable presentations: <span class=\"customMeta\" data-dictid=\"7b09c2b34916927771896ff30fcaa0\">hydrops</span> fetalis, <span class=\"customMeta\" data-dictid=\"77493a5b781692777193df12530299\">neonatal</span> hepatitis.</li>\n<li>Chronic form: ataxia, dystonia, <span class=\"customMeta\" data-dictid=\"67a8159af716927771964aa6043ac2\">psychomotor</span> regression, vertical gaze palsy.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mucopolysaccharidoses (MPSs)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Various enzymes degrading mucopolysaccharides.</p>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dermatan, heparan, keratan, and chondroitin sulfates.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Coarse <span class=\"customMeta\" data-dictid=\"9fdd7489051692777202cffe3f24cc\">facial</span> features, corneal clouding, joint stiffness.</li>\n<li>Intellectual disability, mucopolysacchariduria.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hurler Syndrome </strong></p>\n<p><strong>(MPS I-H)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>α-L-iduronidase</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hepatosplenomegaly, skeletal deformities, <span class=\"customMeta\" data-dictid=\"e2b5f013011692777183ea1b11ed9c\">cardiovascular</span> complications; death by 6-10 years.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hunter Syndrome </strong></p>\n<p><strong>(MPS II)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Iduronate-2-sulphatase.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>X-linked recessive; milder than Hurler, no corneal clouding.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gaucher Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glucocerebrosidase</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glucocerebrosides.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Type I: Non-neuronopathic; splenomegaly, skeletal issues, <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> lifespan.</li>\n<li>Type II: Acute neuronopathic; CNS involvement, early death.</li>\n<li>Type III: Intermediate; <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> and CNS involvement in adolescence/adulthood.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pompe Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acid alpha-glucosidase</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glycogen in lysosomes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Shares feature with LSDs despite <span class=\"customMeta\" data-dictid=\"dda6ab11271692777184264b752d39\">classification</span> as a <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">glycogen</span> storage disease. Cardiomegaly, muscle hypotonia, and <span class=\"customMeta\" data-dictid=\"1b798ee2c21692777183440eb9102c\">cardiorespiratory</span> failure within 2 years.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/KbwSxpDNSCWV2PHkEZ3M1748006944.mp3", "video": ""}, {"text": "Sarah is a 3-year-old girl who is brought to her pediatrician by her parents due to concerns about her development. Her parents report that Sarah has been experiencing a loss of previously acquired skills, such as hand skills and language, stereotypic hand movements and seizure episodes . What is the mode of inheritance?", "options": [{"label": "A", "text": "X-linked dominant", "correct": true}, {"label": "B", "text": "X-linked recessive", "correct": false}, {"label": "C", "text": "Autosomal recessive", "correct": false}, {"label": "D", "text": "Autosomal dominant", "correct": false}], "correct_answer": "A. X-linked dominant", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/EqwyJ5Kx7n6HEsRcNsnb1737478166.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/dRb5DttJLYETfrhWZp6s1748007259.mp3", "video": ""}, {"text": "A 25-year-old male presents with severe hypotonia at birth, joint hypermobility, scoliosis, fragile skin, and ocular fragility. Genetic testing reveals mutations in the gene encoding Lysyl Hydroxylase. Which subtype of Ehlers-Danlos Syndrome (EDS) is most likely present in this patient and its mode of inheritance.?", "options": [{"label": "A", "text": "Classical EDS - Autosomal Dominant", "correct": false}, {"label": "B", "text": "Hypermobility EDS - Autosomal Dominant", "correct": false}, {"label": "C", "text": "Kyphoscoliotic EDS - Autosomal Dominant", "correct": false}, {"label": "D", "text": "Kyphoscoliotic EDS - Autosomal Recessive", "correct": true}], "correct_answer": "D. Kyphoscoliotic EDS - Autosomal Recessive", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/BGvmU5GtDEVr4aUTnuH81736909290.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/a1f2lC9eDBATsEz5o9ln1749027793.mp3", "video": ""}, {"text": "What type of inheritance pattern is associated with hypertrichosis pinnae?", "options": [{"label": "A", "text": "Autosomal Dominant", "correct": false}, {"label": "B", "text": "Autosomal Recessive", "correct": false}, {"label": "C", "text": "X-Linked Dominant", "correct": false}, {"label": "D", "text": "Holandric", "correct": true}], "correct_answer": "D. Holandric", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2hrcP3yK5YrOr7pUvCFj1748007742.mp3", "video": ""}, {"text": "A 5-year-old boy is brought to the emergency department due to excessive bleeding after a minor injury. His mother reports that his grandfather also had similar bleeding episodes. Laboratory tests reveal a deficiency in factor IX. What is the mode of inheritance for this condition?", "options": [{"label": "A", "text": "Autosomal dominant", "correct": false}, {"label": "B", "text": "Autosomal recessive", "correct": false}, {"label": "C", "text": "X-linked recessive", "correct": true}, {"label": "D", "text": "X-linked dominant", "correct": false}], "correct_answer": "C. X-linked recessive", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>X-linked Recessive</strong></p>\n<p style=\"text-align:center\"><strong>(WISE ABCDEFGH)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Wise-</strong>Wiskott Aldrich Syndrome</li>\n<li><strong>AB- </strong>Hemophilia A, B</li>\n<li><strong>B- </strong>Bruton's Hypogammaglobulinemia<strong>.</strong></li>\n<li><strong>C- </strong>Chronic <span class=\"customMeta\" data-dictid=\"9e1f97f6ad169277718805c2dd35c1\">Granulomatous</span> Disease, Red Green Color Blindness</li>\n<li><strong>D- </strong>DMD, BMD</li>\n<li><strong>E- </strong>Lesch Nyhan Syndrome</li>\n<li><strong>F- </strong>Fabry Disease, Fragile X Syndrome</li>\n<li><strong>G- </strong>G6PD Deficiency</li>\n<li><strong>H- </strong>Hunter Disease</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/yR4TJiBYaU1swxl3CMqk1748007872.mp3", "video": ""}, {"text": "If the mother and father have the β-thalassemia trait, what percentage of their children are expected to have β-thalassemia major?", "options": [{"label": "A", "text": "25%", "correct": true}, {"label": "B", "text": "50%", "correct": false}, {"label": "C", "text": "75%", "correct": false}, {"label": "D", "text": "100%", "correct": false}], "correct_answer": "A. 25%", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>β</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>β⁰</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>β</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>β/β</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>β/β⁰</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>β⁰</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>β/β⁰</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>β⁰/β⁰</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/8fS5mpdqNOH7WDdG54N51748008026.mp3", "video": ""}, {"text": "If a mother has sickle cell trait and the father has sickle cell disease , what percentage of their children are expected to have sickle cell disease?", "options": [{"label": "A", "text": "25%", "correct": false}, {"label": "B", "text": "50%", "correct": true}, {"label": "C", "text": "75%", "correct": false}, {"label": "D", "text": "100%", "correct": false}], "correct_answer": "B. 50%", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>S</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>S</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AS</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>S</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SS</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/bDLQqYMTFNOgIXbilPzC1748008177.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A young male patient presented with recurrent episodes of acute neurologic dysfunction, cognitive changes, muscle weakness, and lactic acidosis. There is a family history of similar conditions depicted in the pedigree chart below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "MELAS", "correct": true}, {"label": "B", "text": "MERRF", "correct": false}, {"label": "C", "text": "Metachromatic leukodystrophy", "correct": false}, {"label": "D", "text": "Adrenoleukodystrophy", "correct": false}], "correct_answer": "A. MELAS", "question_images": ["https://image.prepladder.com/content/ywCrHp4SxzzDBfqmJLxZ1738585092.png"], "explanation_images": ["https://image.prepladder.com/content/iwHnBWa8gAG4w9D1bEw41738585128.png", "https://image.prepladder.com/content/DqRtKqAhuViJjRvg9xGv1737480071.png", "https://image.prepladder.com/content/FtuBOHMhG2Wj6nCguNnZ1737480118.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/OQJ0i3fQaouCgOxYE64y1748008380.mp3", "video": ""}, {"text": "What is the most likely diagnosis of a 5-year-old child with hyperphagia, delayed milestones, and growth retardation?", "options": [{"label": "A", "text": "Angelman syndrome", "correct": false}, {"label": "B", "text": "Prader-Willi syndrome", "correct": true}, {"label": "C", "text": "Fragile X syndrome", "correct": false}, {"label": "D", "text": "Patau syndrome", "correct": false}], "correct_answer": "B. Prader-Willi syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2xpb48TCXUg1k3FZaMlX1737510820.png", "https://image.prepladder.com/content/msMCbLDVwLwpymLihndE1737510921.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PWS </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chromosome 15q</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>SNORP gene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Paternal deletion</li>\n<li>Maternal imprinting</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Angelman syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chromosome 15q</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>UBE3A gene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Maternal deletion</li>\n<li>Paternal imprinting</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/vrud6xi1RNo86LaP9mnZ1748008539.mp3", "video": ""}, {"text": "Which of the following does not show the same pattern of inheritance as Leber hereditary optic neuropathy?", "options": [{"label": "A", "text": "MERRF", "correct": false}, {"label": "B", "text": "MELAS", "correct": false}, {"label": "C", "text": "Fragile-X syndrome", "correct": true}, {"label": "D", "text": "NARP", "correct": false}], "correct_answer": "C. Fragile-X syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/CgkK8FhxchC4LvwCtxy71748008684.mp3", "video": ""}, {"text": "Match the following Disease Trinucleotide repeats a. Fragile X syndrome 1. CAG b. Friedreich ataxia 2. CTG c. Myotonic dystrophy 3. GAA d. Huntington disease 4. CGG", "options": [{"label": "A", "text": "a-2, b-1, c-4, d-3", "correct": false}, {"label": "B", "text": "a-4, b-3, c-2, d-1", "correct": true}, {"label": "C", "text": "a-3, b-2, c-1, d-4", "correct": false}, {"label": "D", "text": "a-4, b-1, c-3, d-2", "correct": false}], "correct_answer": "B. a-4, b-3, c-2, d-1", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/lcITWGRUeYSX3d0sGasH1748008794.mp3", "video": ""}, {"text": "A 25-year-old male presents with brief, abrupt, involuntary movements of his arms and face for the last 2 months. A history of Huntington's disease in his father, who was diagnosed at 40 years of age and passed away at the age of 50, is found. What is the mechanism behind this patient’s earlier presentation?", "options": [{"label": "A", "text": "Anticipation", "correct": true}, {"label": "B", "text": "Mosaicism", "correct": false}, {"label": "C", "text": "Imprinting", "correct": false}, {"label": "D", "text": "Non-penetrance", "correct": false}], "correct_answer": "A. Anticipation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autosomal Dominant</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autosomal Recessive</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"6\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Multiple <span class=\"customMeta\" data-dictid=\"1b023a99c41692777199f0afcc23f6\">spinocerebellar</span> ataxias</li>\n<li>Huntington’s disease – CAG repeats</li>\n<li>Myotonic <span class=\"customMeta\" data-dictid=\"04568e3d19169277718672d9da94fd\">dystrophy</span> – CTG</li>\n<li>Congenital <span class=\"customMeta\" data-dictid=\"8faaca347f16927771861001cbc1a8\">dyskeratosis</span> – TTAGGG (telomere repeating sequence)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Friedreich’s <span class=\"customMeta\" data-dictid=\"0842a8a59f1692777182f44d334dda\">ataxia</span> – GAA</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>X-linked</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fragile X Syndrome – CGG</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Others</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Crohn’s disease</li>\n<li>Behcet’s disease</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/IzPOY1Z0NkLd4sdBnBaA1745332204.mp3", "video": ""}, {"text": "A 4-year-old girl is brought to the pediatrician’s office for evaluation of developmental delay and seizures. She is very jovial, has microcephaly and is diagnosed with happy puppet syndrome. What is the genetic basis for this child’s diagnosis?", "options": [{"label": "A", "text": "Imprinting", "correct": true}, {"label": "B", "text": "Robertsonian translocation", "correct": false}, {"label": "C", "text": "Trinucleotide repeats", "correct": false}, {"label": "D", "text": "Monosomy", "correct": false}], "correct_answer": "A. Imprinting", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/udn94lN8mkj4zBMTmw2c1748008965.mp3", "video": ""}, {"text": "Which of the following explains a single mutant gene leading to different end effects in sickle cell anemia?", "options": [{"label": "A", "text": "Variable expressivity", "correct": false}, {"label": "B", "text": "Variable penetrance", "correct": false}, {"label": "C", "text": "Pleiotropy", "correct": true}, {"label": "D", "text": "Genetic heterogeneity", "correct": false}], "correct_answer": "C. Pleiotropy", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/BnVsCiDey6AO4n9Nnnxd1737511511.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/nwBxuG5GIw8YZ01lSnjh1748199508.mp3", "video": ""}, {"text": "A group of researchers studying genetic material noticed the presence of both wild-type and mutated mitochondrial genomes in different mitochondria of the same cells. What does this finding indicate?", "options": [{"label": "A", "text": "Copy number variation", "correct": false}, {"label": "B", "text": "Heteroplasmy", "correct": true}, {"label": "C", "text": "Trinucleotide expansion", "correct": false}, {"label": "D", "text": "Imprinting", "correct": false}], "correct_answer": "B. Heteroplasmy", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/4hoyqxWdk7jlMZNZIdrj1748199647.mp3", "video": ""}, {"text": "A 50-year-old man presents with intentional tremors, cerebellar ataxia, and intellectual disability. His father had similar symptoms at 60 and died due to aortic dissection. The patient's son started showing tremors and has an intellectual disability and aggressive behavior. Additionally males of the family have large ears and mandibles. What condition is most likely affecting him?", "options": [{"label": "A", "text": "Fragile X syndrome", "correct": true}, {"label": "B", "text": "Huntington's disease", "correct": false}, {"label": "C", "text": "Parkinson's disease", "correct": false}, {"label": "D", "text": "Alzheimer's disease", "correct": false}], "correct_answer": "A. Fragile X syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/275ZtRR3lXPFwnAv7NV11748199864.mp3", "video": ""}, {"text": "A one-month-old infant presents with developmental delays and physical features such as a prominent occiput, low-set ears, clenched hands with overlapping fingers, and a small mouth with a protruding tongue. Heart murmurs and rocker-bottom foot deformity are also noted. Which syndrome is the most likely cause of these features?", "options": [{"label": "A", "text": "Noonan syndrome", "correct": false}, {"label": "B", "text": "Down syndrome", "correct": false}, {"label": "C", "text": "Patau syndrome", "correct": false}, {"label": "D", "text": "Edward syndrome", "correct": true}], "correct_answer": "D. Edward syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/SoIRTsGJhBEH1dJFabaO1737511866.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/WdWJZFwzfK2eytt1rKob1748200060.mp3", "video": ""}, {"text": "A 2-year-old boy is brought to the pediatrician by his parents for delayed milestones. Upon examination, the pediatrician notices several physical features, including upward-slanting eyes, a flat facial profile, a protruding tongue, and a single palmar crease. Which type of inheritance is definitely not present in this child?", "options": [{"label": "A", "text": "Meiotic nondisjunction of chromosome 21.", "correct": false}, {"label": "B", "text": "Robertsonian translocation", "correct": false}, {"label": "C", "text": "Mitotic non-disjunction", "correct": false}, {"label": "D", "text": "Autosomal recessive inheritance", "correct": true}], "correct_answer": "D. Autosomal recessive inheritance", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/LT80P47wgq6KWnoyMbPf1748200241.mp3", "video": ""}, {"text": "A 6-month-old child has recently passed away after a long ICU stay. Examination reveals microphthalmia and microcephaly. Other known diagnoses included ventricular septal defect, polycystic kidney disease, and omphalocele at birth. What is the chromosome involved?", "options": [{"label": "A", "text": "Chromosome 21", "correct": false}, {"label": "B", "text": "Chromosome 18", "correct": false}, {"label": "C", "text": "Chromosome 13", "correct": true}, {"label": "D", "text": "Chromosome Y", "correct": false}], "correct_answer": "C. Chromosome 13", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/lsCfRLP60gBPkRTQOute1748889617.mp3", "video": ""}, {"text": "A 30-year-old tall male patient presents to the clinic for fertility treatment. He undergoes testing and is found to have low sperm counts. He has a history of diabetes, and a physical examination reveals gynecomastia, small testes, and minimal facial and body hair. What chromosomal abnormality is most likely causing this condition in the patient?", "options": [{"label": "A", "text": "45,X", "correct": false}, {"label": "B", "text": "47,XXY", "correct": true}, {"label": "C", "text": "47,XXX", "correct": false}, {"label": "D", "text": "47,XYY", "correct": false}], "correct_answer": "B. 47,XXY", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/W77NhqY2LccBG6RsyP4e1736911169.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/MfkAM8KxegYfequIA3n01748200654.mp3", "video": ""}, {"text": "An 18-year-old girl presents to the clinic due to the concern that she hasn't started menstruating yet. The girl has a short stature and a webbed neck. Physical examination reveals a broad chest with widely spaced nipples. What is the most likely diagnosis for this patient?", "options": [{"label": "A", "text": "Turner syndrome", "correct": true}, {"label": "B", "text": "Mullerian agenesis", "correct": false}, {"label": "C", "text": "Congenital adrenal hyperplasia", "correct": false}, {"label": "D", "text": "47, XXX syndrome", "correct": false}], "correct_answer": "A. Turner syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/8msSuSZqSrgl2459td9m1736911241.png", "https://image.prepladder.com/content/3EMQdD0LpDLOjUVhxFY51737512450.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/pViZyVTJMyIaLYv6t7uS1748200876.mp3", "video": ""}, {"text": "A 15-year-old boy presents to the clinic with tall stature and long limbs, along with a history of frequent joint dislocations. Upon physical examination, he exhibits long fingers ,sunken chest, and an echocardiogram shows a dilated aortic root. Considering these clinical features, which of the following genes are commonly mutated in this condition?", "options": [{"label": "A", "text": "FBN 1", "correct": true}, {"label": "B", "text": "FBN 2", "correct": false}, {"label": "C", "text": "FBN 3", "correct": false}, {"label": "D", "text": "FBN 4", "correct": false}], "correct_answer": "A. FBN 1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/wwnO9NTqjKxLYwX9AneM1736911981.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Marfan D</strong>isease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li style=\"text-align:center\">The most common Clinical Manifestation is Skeletal Abnormalities.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>M</strong>itral <span class=\"customMeta\" data-dictid=\"416dd1004a169277720177d9a6adc5\">Valve</span> <span class=\"customMeta\" data-dictid=\"c49cc1bac4169277719692da7af2cc\">Prolapse</span> (Most common <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">Cardiac</span> abnormality)</li>\n<li><strong>A</strong>ortic <span class=\"customMeta\" data-dictid=\"e42da316b916927771860f0ba81c19\">Dissection</span> (Most common cause of death)</li>\n<li><strong>R</strong>etinal <span class=\"customMeta\" data-dictid=\"2b005085881692777186cf95c3ad51\">Detachment</span> (eye problem)</li>\n<li><strong>F</strong>reely moveable Joint (most common Thumb joint)</li>\n<li><strong>A</strong>rachnodactyly (long fingers, <span class=\"customMeta\" data-dictid=\"87bbbfb59516927771992f5372ca87\">spider</span> fingers), High <strong>A</strong>rched Palate</li>\n<li><strong>N</strong>ine <span class=\"customMeta\" data-dictid=\"32656dc8ba1692777202fc49f9ed13\">Feet</span> Tall, <span class=\"customMeta\" data-dictid=\"947301d8e01692777195aea76f95b6\">Pigeon chest</span> (defect in sternum)</li>\n<li><strong>D</strong>islocation of the lens (Ectopia Lentis- Direction of <span class=\"customMeta\" data-dictid=\"c1aae6e67f169277718624a4e51cfe\">dislocation</span> is Supero Temporal)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Steinberg Sign</strong>- Positive if the thumb tip extends beyond the palm when folded into a closed fist</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Walker Sign- </strong>Positive if the thumb and <span class=\"customMeta\" data-dictid=\"8226badd751692777203022e3dc57b\">fifth finger</span> <span class=\"customMeta\" data-dictid=\"ea564f2f5e1692777194df1391fd69\">overlap</span> when you grip your wrist with the opposite hand</p>\n<p><img alt=\"\" data-author=\"Graziella F. B. Cipriano; Guilherme C. Brech; Paulo A. T. Peres; Cássia C. Mendes; Gerson Cipriano Júnior; Antônio C. C. Carvalho\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Steinberg_and_Walker-Murdoch_tests.jpg\" data-tags=\"\" height=\"2382\" src=\"https://image.prepladder.com/content/wwnO9NTqjKxLYwX9AneM1736911981.png\" width=\"4167\"/></p>\n</td>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/fiT5WJizkUY4pzTi1BqM1749028064.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 25 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A karyotyping image is given below. What are the clinical features most likely to be expected in such patients?", "options": [{"label": "A", "text": "Gynecomastia and long limbs", "correct": true}, {"label": "B", "text": "Flat occiput", "correct": false}, {"label": "C", "text": "Webbing of neck and lymphedema", "correct": false}, {"label": "D", "text": "Cleft lip and polydactyly", "correct": false}], "correct_answer": "A. Gynecomastia and long limbs", "question_images": ["https://image.prepladder.com/content/Hg3mPHhDKO3B2pA68MxG1745576332.png"], "explanation_images": ["https://image.prepladder.com/content/IlZlBavuLfvO5Uhf3VcS1745576357.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the interpretation of the given pedigree chart?", "options": [{"label": "A", "text": "Autosomal dominant", "correct": true}, {"label": "B", "text": "Autosomal recessive", "correct": false}, {"label": "C", "text": "X-linked recessive", "correct": false}, {"label": "D", "text": "X-linked dominant", "correct": false}], "correct_answer": "A. Autosomal dominant", "question_images": ["https://image.prepladder.com/notes/aOrYY3usL82CTWfobGGv1747378869.png"], "explanation_images": ["https://image.prepladder.com/content/s1wfDl3FLMTNHxECWfag1746426560.png", "https://image.prepladder.com/content/IZhuK6ihsTnDjEByX0Pq1746426571.png", "https://image.prepladder.com/content/Jpi9i8XZoCSMByBIU4n51746426585.png", "https://image.prepladder.com/content/BLSdyeUdodDwEwcBQ3zA1746426596.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old pregnant woman who has the thalassemia trait visits the clinic for genetic counselling. Her husband is also confirmed to have the thalassemia trait. Considering their genetic background, what is the likelihood of their next offspring having thalassemia?", "options": [{"label": "A", "text": "100%", "correct": false}, {"label": "B", "text": "50%", "correct": false}, {"label": "C", "text": "75%", "correct": false}, {"label": "D", "text": "25%", "correct": true}], "correct_answer": "D. 25%", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Punnett Square Analysis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>β</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>β⁰</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>β</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">β/β</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">β/β⁰</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>β⁰</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">β/β⁰</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">β⁰/β⁰</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following correctly represents the effect of the mutation causing sickle cell anaemia?", "options": [{"label": "A", "text": "Glutamate by valine at the 6th position", "correct": true}, {"label": "B", "text": "Valine by glutamate at the 6th position", "correct": false}, {"label": "C", "text": "Glutamate by valine at the 5th position", "correct": false}, {"label": "D", "text": "Valine by glutamate at the 5th position", "correct": false}], "correct_answer": "A. Glutamate by valine at the 6th position", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following with the appropriate disorder. A. Autosomal recessive Kennedy disease B. Mitochondrial 2. Duchenne’s muscular dystrophy C. X-linked recessive 3. Leber’s disease D. Trinucleotide repeats 4. Cystic fibrosis", "options": [{"label": "A", "text": "A-4, B-3, C-1, D-2", "correct": false}, {"label": "B", "text": "A-4, B-3, C-2, D-1", "correct": true}, {"label": "C", "text": "A-2, B-1, C-3, D-4", "correct": false}, {"label": "D", "text": "A-1, B-2, C-4, D-3", "correct": false}], "correct_answer": "B. A-4, B-3, C-2, D-1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cystic fibrosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mitochondrial </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Leber’s disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>X-linked recessive</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Duchenne’s <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> dystrophy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Trinucleotide repeats</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Kennedy disease</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">Recessive</span> Disorders</strong></p>\n<p>(Mnemonic: Pasta Fried Chawal/ Big Fax)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>P</strong>- Phenylketonuria</li>\n<li><strong>A</strong>- Alkaptonuria</li>\n<li><strong>S</strong>- Sickle cell anaemia</li>\n<li><strong>Ta</strong>- Thalassemia</li>\n<li><strong>Fried</strong>- Friedreich's ataxia</li>\n<li><strong>C</strong>- <strong>Cystic Fibrosis</strong></li>\n<li><strong>H</strong>- <span class=\"customMeta\" data-dictid=\"904d77ba8a16927771882396edef7c\">Hemophilia</span> C, Homocystinuria, Hemochromatosis</li>\n<li><strong>A</strong>- <span class=\"customMeta\" data-dictid=\"a9268f2e1d16927771814cfef69cf4\">Alpha</span> 1 Antitrypsin Deficiency</li>\n<li><strong>W</strong>- Wilson Disease</li>\n<li><strong>A</strong>- Albinism, <span class=\"customMeta\" data-dictid=\"488a4efe7d16927771840c9e29f164\">Congenital</span> <span class=\"customMeta\" data-dictid=\"f955f012f716927771801d01e7d163\">Adrenal</span> Hyperplasia</li>\n<li><strong>L</strong>- Lysosomal Storage Disease, <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">Glycogen</span> Storage Disease</li>\n<li><strong>Big</strong>-Bloom syndrome</li>\n<li><strong>Fa</strong>- Fanconi anemia, <span class=\"customMeta\" data-dictid=\"0842a8a59f1692777182f44d334dda\">Ataxia</span> telangiectasia</li>\n<li><strong>X</strong>- <span class=\"customMeta\" data-dictid=\"9983ab5c3016927772021e399ed902\">Xeroderma</span> pigmentosum</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>X-linked Recessive</strong></p>\n<p>(Mnemonic: WISE ABCDEFGH)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Wise-</strong>Wiskott Aldrich Syndrome</li>\n<li><strong>AB- </strong>Hemophilia A, B</li>\n<li><strong>B- </strong>Bruton's Hypogammaglobulinemia<strong>.</strong></li>\n<li><strong>C- </strong>Chronic <span class=\"customMeta\" data-dictid=\"9e1f97f6ad169277718805c2dd35c1\">Granulomatous</span> Disease, Red Green Color Blindness</li>\n<li><strong>D- </strong><strong>DMD (Duchenne’s <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> dystrophy)</strong>, BMD (Becker <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">Muscular</span> Dystrophy)</li>\n<li><strong>E- </strong>Lesch Nyhan Syndrome</li>\n<li><strong>F- </strong>Fabry Disease, Fragile X Syndrome</li>\n<li><strong>G- </strong>G6PD Deficiency</li>\n<li><strong>H- </strong>Hunter Disease</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Trinucleate-Repeat Disorders</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Fragile X Syndrome</li>\n<li>Friedreich ataxia</li>\n<li>Myotonic dystrophy</li>\n<li><strong>Spinobulbar <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> (Kennedy disease) </strong></li>\n<li>Dentatorubral-pallidoluysian <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> (Haw River syndrome)</li>\n<li>Spinocerebellar ataxia</li>\n<li>Huntington disease</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "B cells express IgM and IgD antibodies at the same time. Which phenomenon is it due to?", "options": [{"label": "A", "text": "Somatic hypermutation", "correct": false}, {"label": "B", "text": "Alternative RNA splicing", "correct": true}, {"label": "C", "text": "Affinity maturation", "correct": false}, {"label": "D", "text": "Allelic exclusion", "correct": false}], "correct_answer": "B. Alternative RNA splicing", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Differential expression of a gene depending upon the parent of origin is a feature of:", "options": [{"label": "A", "text": "Gonadal mosaicism", "correct": false}, {"label": "B", "text": "Genomic imprinting", "correct": true}, {"label": "C", "text": "Anticipation", "correct": false}, {"label": "D", "text": "Incomplete penetrance", "correct": false}], "correct_answer": "B. Genomic imprinting", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:659px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prader-Willi syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chromosome 15q</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>SNORP gene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Paternal deletion</li>\n<li>Maternal imprinting</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Angelman syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chromosome 15q</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>UBE3A gene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Maternal deletion</li>\n<li>Paternal imprinting</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following disorders is inherited in an X-linked dominant pattern?", "options": [{"label": "A", "text": "Rett syndrome", "correct": true}, {"label": "B", "text": "Duchenne muscular dystrophy", "correct": false}, {"label": "C", "text": "Huntington’s disease", "correct": false}, {"label": "D", "text": "Tuberous sclerosis", "correct": false}], "correct_answer": "A. Rett syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/oYsEE8la5T1Yv5ELu2yO1746691976.png"], "explanation": "<p><strong>Educational Objective:</strong></p>\n<ul><li>➤ Learning Objective:</li><li>➤ X-linked dominance is more common in females. Affected males transmit the disease only to their daughters. Affected females transmit the disease to both daughters and sons.</li><li>➤ X-linked dominance is more common in females.</li><li>➤ Affected males transmit the disease only to their daughters.</li><li>➤ Affected females transmit the disease to both daughters and sons.</li></u\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In cystic fibrosis, which of the following structures is affected in the pancreas?", "options": [{"label": "A", "text": "A", "correct": false}, {"label": "B", "text": "B", "correct": true}, {"label": "C", "text": "C", "correct": false}, {"label": "D", "text": "D", "correct": false}], "correct_answer": "B. B", "question_images": ["https://image.prepladder.com/notes/PChpB28XGpQnj06vDDwP1747125390.jpg"], "explanation_images": [], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Respiratory system</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Gastrointestinal and hepatic</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Others</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Progressive <span class=\"customMeta\" data-dictid=\"3b9dd3166f1692777180b697887ccb\">airway</span> obstruction</li>\n<li>Infective exacerbations of bronchiectasis</li>\n<li>Respiratory failure</li>\n<li>Spontaneous pneumothorax</li>\n<li>Haemoptysis</li>\n<li>Lobar collapse due to secretions</li>\n<li>Pulmonary hypertension</li>\n<li>Nasal polyps</li>\n</ul>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Malabsorption and steatorrhoea</li>\n<li>Distal <span class=\"customMeta\" data-dictid=\"fb7b40ddbe1692777190ca311f4bd7\">intestinal obstruction</span> syndrome</li>\n<li>Biliary cirrhosis</li>\n<li>Portal hypertension, varices, and splenomegaly</li>\n<li>Gallstones</li>\n</ul>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Diabetes</li>\n<li>Delayed puberty,</li>\n<li>Male infertility</li>\n<li>Stress <span class=\"customMeta\" data-dictid=\"76979fe6ab16927771902f20401597\">incontinence</span> due to repeated forced cough</li>\n<li>Psychosocial problems</li>\n<li>Osteoporosis</li>\n<li>Arthropathy</li>\n<li>Cutaneous vasculitis</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the syndrome associated with the chromosomal pattern shown in the image below:", "options": [{"label": "A", "text": "Angelman syndrome", "correct": false}, {"label": "B", "text": "Prader-Willi syndrome", "correct": true}, {"label": "C", "text": "Rett syndrome", "correct": false}, {"label": "D", "text": "Cri-du-chat syndrome", "correct": false}], "correct_answer": "B. Prader-Willi syndrome", "question_images": ["https://image.prepladder.com/content/SlWxjZTCKKbiAxzoEY0K1724833325.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ETvv2IqxR5DPLSvY97gZ1748420571.mp3", "video": ""}, {"text": "A girl presents with short stature, a webbed neck, thick calves, a shield-shaped chest, swelling of the ankle, and an increased carrying angle. What is the likely diagnosis?", "options": [{"label": "A", "text": "Turner syndrome", "correct": true}, {"label": "B", "text": "Down syndrome", "correct": false}, {"label": "C", "text": "Patau syndrome", "correct": false}, {"label": "D", "text": "Edward syndrome", "correct": false}], "correct_answer": "A. Turner syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/C9PK4lWlUjKKATNe9w0E1746439751.png", "https://image.prepladder.com/notes/HeEIixaIiNQsqBhjBbdy1746439909.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The family pedigree chart is given below. Identify the mode of inheritance of this condition.", "options": [{"label": "A", "text": "Autosomal dominant", "correct": true}, {"label": "B", "text": "Autosomal recessive", "correct": false}, {"label": "C", "text": "X-linked dominant", "correct": false}, {"label": "D", "text": "X-linked recessive", "correct": false}], "correct_answer": "A. Autosomal dominant", "question_images": ["https://image.prepladder.com/notes/udN9NhsB5vWegBkOg8xx1746441057.png"], "explanation_images": ["https://image.prepladder.com/notes/udN9NhsB5vWegBkOg8xx1746441057.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:608px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Mnemonic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>He</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>H</strong>ereditary spherocytosis</li>\n<li><strong>H</strong>ereditary hemorrhagic telangiectasia</li>\n<li><strong>H</strong>ereditary non-polyposis <span class=\"customMeta\" data-dictid=\"f04bf2125316927771847bfe139191\">colorectal</span> cancer (HNPCC/Lynch syndrome)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Has</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>H</strong>untington’s disease</li>\n<li><strong>H</strong>ypertrophic cardiomyopathy</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>A </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>A</strong>utosomal dominant <span class=\"customMeta\" data-dictid=\"ba336eb30516927771960f9d9bd85c\">polycystic</span> <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">kidney</span> disease</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Very</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Von Willebrand disease</strong></li>\n<li><strong>V</strong>on Hippel Lindau syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Dominant</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>D</strong>ystonia myotonica</li>\n<li><strong>O</strong>steogenesis imperfecta</li>\n<li><strong>M</strong>arfan’s syndrome</li>\n<li><strong>I</strong>ntermittent porphyria</li>\n<li><strong>N</strong>F-1 & 2</li>\n<li><strong>A</strong>chondroplasia</li>\n<li><strong>N</strong>oonan syndrome</li>\n<li><strong>T</strong>uberous sclerosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Powerful</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>P</strong>seudohypoparathyroidism</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Father</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>F</strong>amilial <span class=\"customMeta\" data-dictid=\"bf1f32fbd81692777180c0d2485ab2\">adenomatous</span> polyposis</li>\n<li>Li <strong>F</strong>raumeni syndrome</li>\n<li><strong>F</strong>amilial hypercholesterolemia</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is correct about Huntington's chorea?", "options": [{"label": "A", "text": "It is a trinucleotide repeat disorder", "correct": true}, {"label": "B", "text": "There is a loss of function type of mutation", "correct": false}, {"label": "C", "text": "There are abnormal length repeats of CUG", "correct": false}, {"label": "D", "text": "Abnormality is seen due to a defect in chromosome 6", "correct": false}], "correct_answer": "A. It is a trinucleotide repeat disorder", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:659px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Trinucleotide Repeat</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Gene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Chromosome</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Huntington's Disease</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>CAG</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>HTT (Huntingtin)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>4p16.3</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Fragile X Syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>CGG</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>FMR1</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Xq27.3</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Myotonic Dystrophy</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>CTG</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>DMPK</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>19q13.3</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Friedreich Ataxia</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>GAA</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>FXN</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>9q21.1</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Premature ageing in Werner syndrome is due to:", "options": [{"label": "A", "text": "Increased telomerase activity", "correct": false}, {"label": "B", "text": "Defects in DNA helicase", "correct": true}, {"label": "C", "text": "Increase in length of telomere due to decrease in telomerase activity", "correct": false}, {"label": "D", "text": "Decreased telomerase activity", "correct": false}], "correct_answer": "B. Defects in DNA helicase", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the mode of inheritance in a patient suffering from colour blindness?", "options": [{"label": "A", "text": "AD", "correct": false}, {"label": "B", "text": "AR", "correct": false}, {"label": "C", "text": "XLR", "correct": true}, {"label": "D", "text": "XLD", "correct": false}], "correct_answer": "C. XLR", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>X-linked Recessive</strong></p>\n<p style=\"text-align: center;\"><strong>(WISE ABCDEFGH)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Wise-</strong>Wiskott Aldrich Syndrome</p>\n<p><strong>AB- </strong>Hemophilia A, B</p>\n<p><strong>B- </strong>Bruton's Hypogammaglobulinemia<strong>.</strong></p>\n<p><strong>C- </strong>Chronic Granulomatous Disease, Red Green Color Blindness</p>\n<p><strong>D- </strong>DMD, BMD</p>\n<p><strong>E- </strong>Lesch Nyhan Syndrome</p>\n<p><strong>F- </strong>Fabry Disease, Fragile X Syndrome</p>\n<p><strong>G- </strong>G6PD Deficiency</p>\n<p><strong>H- </strong>Hunter Disease</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the diagnosis of a 14-year-old child who has short stature, widely placed nipples, and primary amenorrhea?", "options": [{"label": "A", "text": "Turner syndrome", "correct": true}, {"label": "B", "text": "Down syndrome", "correct": false}, {"label": "C", "text": "Edward syndrome", "correct": false}, {"label": "D", "text": "Pattau syndrome", "correct": false}], "correct_answer": "A. Turner syndrome", "question_images": ["https://image.prepladder.com/content/MPPw962VFCk2Or3vcAUp1695215187.png"], "explanation_images": ["https://image.prepladder.com/content/yhOwFc7Z3I9a2fTRk2PJ1695215172.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the mode of inheritance in a patient suffering from red-green colour blindness?", "options": [{"label": "A", "text": "Autosomal dominant", "correct": false}, {"label": "B", "text": "Autosomal recessive", "correct": false}, {"label": "C", "text": "X-linked dominant", "correct": false}, {"label": "D", "text": "X-linked recessive", "correct": true}], "correct_answer": "D. X-linked recessive", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - <span class=\"customMeta\" data-dictid=\"dd35346fc716927772029e2f0bb10f\">X-linked</span> recessiv\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/UpiPGXrG1aNH3DCLQRBJ1748419317.mp3", "video": ""}, {"text": "t(11,22) is best diagnosed by …………..", "options": [{"label": "A", "text": "Conventional karyotyping", "correct": false}, {"label": "B", "text": "FISH", "correct": true}, {"label": "C", "text": "Bone marrow aspiration", "correct": false}, {"label": "D", "text": "Next generation sequencing", "correct": false}], "correct_answer": "B. FISH", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the columns A. Autosomal dominant 1. Duchenne muscular dystrophy B. X-linked recessive 2. Leber hereditary optic neuropathy C. Autosomal recessive 3. Cystic fibrosis D. Mitochondrial 4. Myotonic dystrophy", "options": [{"label": "A", "text": "A-1, B-4, C-2, D-3", "correct": false}, {"label": "B", "text": "A-2, B-3, C-4, D-1", "correct": false}, {"label": "C", "text": "A-1, B-3, C-2, D-4", "correct": false}, {"label": "D", "text": "A-4, B-1, C-3, D-2", "correct": true}], "correct_answer": "D. A-4, B-1, C-3, D-2", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/s1m04AN8S47hFMSyEdXj1745926244.png", "https://image.prepladder.com/content/zOeSK2BrQIJWQYiLbTk11745926254.png", "https://image.prepladder.com/content/spuaNuCgpaNaF9yGY1dV1745926265.png", "https://image.prepladder.com/content/Cc9HvJzPLBvFBqw70cOz1745926294.png", "https://image.prepladder.com/content/WKrxonlcPzjaA3nfPdIi1745926303.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Autosomal dominant</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p>Myotonic dystrophy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>X-linked recessive</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Duchenne <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> dystrophy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Autosomal recessive</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Cystic fibrosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mitochondrial</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Leber <span class=\"customMeta\" data-dictid=\"ee5175c06116927771880846d1cbe0\">hereditary</span> <span class=\"customMeta\" data-dictid=\"1b9a354cdb1692777194802683234d\">optic</span> neuropathy</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:727px\">\n<tbody>\n<tr>\n<td colspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Modes of inheritance</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Mode of Inheritance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Pedigree</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Explanation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Diseases</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Autosomal Dominant</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/s1m04AN8S47hFMSyEdXj1745926244.png\" width=\"4168\"/></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Vertical transmission</li>\n<li>Affected individuals in every generation</li>\n<li>Male-to-male transmission</li>\n<li>Equal male: female ratio</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Huntington's disease</li>\n<li>Marfan syndrome</li>\n<li>Neurofibromatosis type</li>\n<li>Myotonic dystrophy</li>\n</ul>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Autosomal Recessive</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/zOeSK2BrQIJWQYiLbTk11745926254.png\" width=\"4167\"/></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Horizontal transmission</li>\n<li>Skips generations</li>\n<li>Consanguinity often seen</li>\n<li>Equal male: female ratio</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Cystic fibrosis</li>\n<li>Sickle cell anemia</li>\n<li>Beta-thalassemia</li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>X-Linked Dominant</strong></p>\n<p> </p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/spuaNuCgpaNaF9yGY1dV1745926265.png\" width=\"4168\"/></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>No male-to-male transmission</li>\n<li>Affected fathers pass the trait to all daughters</li>\n<li>More severely affected males.</li>\n</ul>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Orofaciodigital syndrome.</li>\n<li>Incontinentia Pigmenti</li>\n<li>Vitamin D-resistant rickets.</li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>X-Linked Recessive</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/Cc9HvJzPLBvFBqw70cOz1745926294.png\" width=\"4168\"/></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Primarily affects males.</li>\n<li>No male-to-male transmission.</li>\n<li>Unaffected carrier females.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Hemophilia A.</li>\n<li>Duchenne <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">muscular</span> dystrophy.</li>\n<li>Hunter Syndrome.</li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mitochondrial (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/WKrxonlcPzjaA3nfPdIi1745926303.png\" width=\"4168\"/></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Maternal transmission only.</li>\n<li>Both sexes can be affected.</li>\n<li>All offspring of the affected mother are affected.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Leigh Disease.</li>\n<li>MELAS syndrome.</li>\n<li>Leber <span class=\"customMeta\" data-dictid=\"ee5175c06116927771880846d1cbe0\">hereditary</span> <span class=\"customMeta\" data-dictid=\"1b9a354cdb1692777194802683234d\">optic</span> neuropathy.</li>\n</ul>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 23-year-old female with a height of 4 feet has a karyotype, as shown in the image below. Which of the following conditions is the most likely etiology?", "options": [{"label": "A", "text": "Turner syndrome", "correct": true}, {"label": "B", "text": "Klinefelter syndrome", "correct": false}, {"label": "C", "text": "Mayer-Rokitansky-Küster-Hauser syndrome (MRKHS)", "correct": false}, {"label": "D", "text": "Edwards syndrome", "correct": false}], "correct_answer": "A. Turner syndrome", "question_images": ["https://image.prepladder.com/content/VTnBQJ9cT9tgHcDyRA2e1724915032.png"], "explanation_images": ["https://image.prepladder.com/content/8K5A7u6typtOZl8D3Bk51724850005.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ZzdlKdS5T6BFwBoW91GS1748420694.mp3", "video": ""}, {"text": "Identify the disease associated with the image provided:", "options": [{"label": "A", "text": "Gaucher's disease", "correct": true}, {"label": "B", "text": "Tay-Sachs disease", "correct": false}, {"label": "C", "text": "Sandhoff's disease", "correct": false}, {"label": "D", "text": "Fabry's disease", "correct": false}], "correct_answer": "A. Gaucher's disease", "question_images": ["https://image.prepladder.com/content/bnbIvBMJDIKeXIGAFuoV1724850756.png"], "explanation_images": ["https://image.prepladder.com/content/MmnKBsTrBbsYsyzoXWtl1724850796.png"], "explanation": "<p>Correct Option A - Gauch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/66whpmbiqd7FamFZ23LY1748420797.mp3", "video": ""}, {"text": "Which of the following diseases follows the mode of inheritance shown in the image provided?", "options": [{"label": "A", "text": "Wiskott-Aldrich syndrome", "correct": true}, {"label": "B", "text": "Wilson's disease", "correct": false}, {"label": "C", "text": "Prader-Willi syndrome", "correct": false}, {"label": "D", "text": "Achondroplasia", "correct": false}], "correct_answer": "A. Wiskott-Aldrich syndrome", "question_images": ["https://image.prepladder.com/content/yHbSs9UZqPVeUCg6cxpV1724850901.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/dmqAQJMoF8TC33GkHsy61748420906.mp3", "video": ""}, {"text": "An adult tall male presents with subluxation of the lens, long arm span, pectus excavatum, and cardiac abnormalities. What is the most likely protein found to be defective?", "options": [{"label": "A", "text": "Elastin", "correct": false}, {"label": "B", "text": "Collagen", "correct": false}, {"label": "C", "text": "Fibrillin", "correct": true}, {"label": "D", "text": "Laminin", "correct": false}], "correct_answer": "C. Fibrillin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C – F\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/anPiVDuQ1YS41askCVHj1748421024.mp3", "video": ""}, {"text": "Which mutation is linked to the Philadelphia chromosome?", "options": [{"label": "A", "text": "Inversion", "correct": false}, {"label": "B", "text": "Deletion", "correct": false}, {"label": "C", "text": "Reciprocal translocation", "correct": true}, {"label": "D", "text": "Insertion", "correct": false}], "correct_answer": "C. Reciprocal translocation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A teenager was brought to the OPD with complaints of delayed fertility and primary amenorrhea. Physical examination reveals a webbed neck and widely spaced nipples. Which karyotype is associated with a given condition?", "options": [{"label": "A", "text": "45, X", "correct": true}, {"label": "B", "text": "47, XXY", "correct": false}, {"label": "C", "text": "47, XXX", "correct": false}, {"label": "D", "text": "47, XYY", "correct": false}], "correct_answer": "A. 45, X", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/R8z6abI0gDLSvEd6LVUU1747309815.png", "https://image.prepladder.com/content/IAfb4hPJkDEaOBZa08eU1747309815.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a feature of G6PD deficiency?", "options": [{"label": "A", "text": "Males and females are equally affected", "correct": true}, {"label": "B", "text": "Oxidative stress", "correct": false}, {"label": "C", "text": "Absence of NADPH", "correct": false}, {"label": "D", "text": "Presence of Heinz's bodies", "correct": false}], "correct_answer": "A. Males and females are equally affected", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/X9opwWrMBga22Zrby7N71718319357.png"], "explanation": "<p>Correct Option A - Males and females are equ\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/p0j0IBEzil7blBe4uLzs1748419836.mp3", "video": ""}, {"text": "What does the given pedigree chart indicate?", "options": [{"label": "A", "text": "Autosomal Dominant (AD)", "correct": false}, {"label": "B", "text": "Autosomal Recessive (AR)", "correct": false}, {"label": "C", "text": "Mitochondrial Disorder", "correct": true}, {"label": "D", "text": "X-linked Recessive (XLR)", "correct": false}], "correct_answer": "C. Mitochondrial Disorder", "question_images": ["https://image.prepladder.com/content/0CXQ1bvy8VuVEyZkg8nt1747218542.png"], "explanation_images": ["https://image.prepladder.com/content/5skDdAfDuGiJO0p3NtP31747218814.png", "https://image.prepladder.com/content/FXra7bgMPskDCfNl5v6D1747218814.png", "https://image.prepladder.com/content/JA3BK0fWs5QsKTXhVqLG1747218814.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child with a strawberry skull, mental retardation, and the given karyotype suggests which diagnosis?", "options": [{"label": "A", "text": "Patau syndrome", "correct": false}, {"label": "B", "text": "Edward syndrome", "correct": true}, {"label": "C", "text": "Prader-Willi syndrome", "correct": false}, {"label": "D", "text": "Angelman syndrome", "correct": false}], "correct_answer": "B. Edward syndrome", "question_images": ["https://image.prepladder.com/content/weDu53gtkjQl94AqarMr1747219850.png"], "explanation_images": ["https://image.prepladder.com/content/lqfwMa7fqB9BAqDUKeug1747219893.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are used to detect abnormal gene sequences, except?", "options": [{"label": "A", "text": "FISH", "correct": false}, {"label": "B", "text": "RFLP analysis", "correct": false}, {"label": "C", "text": "Pyrosequencing", "correct": false}, {"label": "D", "text": "Flow cytometry", "correct": true}], "correct_answer": "D. Flow cytometry", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the interpretation of the given pedigree chart?", "options": [{"label": "A", "text": "Incomplete penetrance", "correct": false}, {"label": "B", "text": "Autosomal dominant", "correct": true}, {"label": "C", "text": "Autosomal recessive", "correct": false}, {"label": "D", "text": "Pseudo-dominance", "correct": false}], "correct_answer": "B. Autosomal dominant", "question_images": ["https://image.prepladder.com/notes/0Q4HirYHWIXMB6GZuD8v1746180703.png"], "explanation_images": ["https://image.prepladder.com/content/XQhszERJI5xqU8L0BT5u1746007195.png", "https://image.prepladder.com/content/iUmWzcSWlWIRh7KrccvU1746007195.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following genetic abnormalities with their disorders. A. Trinucleotide repeat Patau syndrome B. Trisomy 18 2. Huntington C. Trisomy 13 3. Sickle cell anemia D. Hb beta chain Glu 4. Edward syndrome", "options": [{"label": "A", "text": "A-1, B-3, D-4, D-2", "correct": false}, {"label": "B", "text": "A-1, B-2, C-3, D-4", "correct": false}, {"label": "C", "text": "A-2, B-4, C-1, D-3", "correct": true}, {"label": "D", "text": "A-2, B-1, C-4, D-3", "correct": false}], "correct_answer": "C. A-2, B-4, C-1, D-3", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Trinucleotide repeat</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Huntington</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Trisomy 18</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Edward syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Trisomy 13</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Patau syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hb <span class=\"customMeta\" data-dictid=\"806eb8418c16927771822855b56695\">beta</span> chain Glu</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sickle cell anemia</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The SRY gene is present on:", "options": [{"label": "A", "text": "Y-chromosome short arm", "correct": true}, {"label": "B", "text": "Y-chromosome long arm", "correct": false}, {"label": "C", "text": "X-chromosome short arm", "correct": false}, {"label": "D", "text": "X-chromosome long arm", "correct": false}], "correct_answer": "A. Y-chromosome short arm", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the type of inheritance?", "options": [{"label": "A", "text": "Autosomal Dominant", "correct": true}, {"label": "B", "text": "Autosomal Recessive", "correct": false}, {"label": "C", "text": "X-linked dominant", "correct": false}, {"label": "D", "text": "X-linked recessive", "correct": false}], "correct_answer": "A. Autosomal Dominant", "question_images": ["https://image.prepladder.com/content/Ogrj79EVG6dyACKyDgcA1692767080.png"], "explanation_images": ["https://image.prepladder.com/content/LvR2VwfshHJqQUHzjU2w1712123892.png"], "explanation": "<p>Correct Option A - Autosomal Dominant Inh\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/qgLHVT7ieMfxEUmylquU1748416143.mp3", "video": ""}, {"text": "A 30-year-old pregnant woman who has the thalassemia trait visits the clinic for genetic counseling. Her husband is also confirmed to have the thalassemia trait. Considering their genetic background, what is the likelihood of their next offspring having thalassemia?", "options": [{"label": "A", "text": "100%", "correct": false}, {"label": "B", "text": "50%", "correct": false}, {"label": "C", "text": "75%", "correct": false}, {"label": "D", "text": "25%", "correct": true}], "correct_answer": "D. 25%", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - \n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/fY65XLDLuSmjk3jxX7iN1748416313.mp3", "video": ""}, {"text": "Which of the following is true regarding the Mendelian mode of inheritance?", "options": [{"label": "A", "text": "2/3 rd of Mendelian disorders are autosomal dominant", "correct": true}, {"label": "B", "text": "1/3rd of Mendelian disorders are autosomal recessive", "correct": false}, {"label": "C", "text": "Every 5 th patient has an X-linked recessive disorder", "correct": false}, {"label": "D", "text": "Every 10 th patient has a Y-linked disorder", "correct": false}], "correct_answer": "A. 2/3 rd of Mendelian disorders are autosomal dominant", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:480px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>65% of <span class=\"customMeta\" data-dictid=\"534a300a2c169277719290ac7aa1bf\">mendelian</span> disorders are autosomal dominant</strong></li>\n<li>25% are autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> <strong>(Option B)</strong></li>\n<li>5% are <span class=\"customMeta\" data-dictid=\"dd35346fc716927772029e2f0bb10f\">X-linked</span> <strong>(Option C)</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true about Turner syndrome ?", "options": [{"label": "A", "text": "Webbing of hands and toes are associated with risk of visceral anomalies", "correct": false}, {"label": "B", "text": "Noonan syndrome is more associated with cardiac defects", "correct": false}, {"label": "C", "text": "Absence of neck webbing is associated with higher risk of co-arctation of aorta", "correct": false}, {"label": "D", "text": "Webbing of neck is associated with higher risk of cardiac anomalies", "correct": true}], "correct_answer": "D. Webbing of neck is associated with higher risk of cardiac anomalies", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/jOlndzw3t1axqHJZy7Je1715929905.png", "https://image.prepladder.com/content/jOlndzw3t1axqHJZy7Je1715929905.png"], "explanation": "<p>Correct Option D - Webbing of neck is associated with higher risk of <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ABSssLA3TknRQmQadvLT1748415976.mp3", "video": ""}, {"text": "An affected male does not have affected children, but an affected female always has affected children. What is the type of inheritance?", "options": [{"label": "A", "text": "X-linked recessive", "correct": false}, {"label": "B", "text": "Autosomal recessive", "correct": false}, {"label": "C", "text": "X-linked dominant", "correct": false}, {"label": "D", "text": "Mitochondrial", "correct": true}], "correct_answer": "D. Mitochondrial", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2YL23hEF5BHgJVQy8H2f1713266814.png"], "explanation": "<p>Correct Option D - Mitoch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/4oHFwMJ9QeuxwducCQkI1748415849.mp3", "video": ""}, {"text": "With which pattern of disease inheritance is consanguinity associated?", "options": [{"label": "A", "text": "Autosomal recessive", "correct": true}, {"label": "B", "text": "Autosomal dominant", "correct": false}, {"label": "C", "text": "X-linked recessive", "correct": false}, {"label": "D", "text": "X-linked dominant", "correct": false}], "correct_answer": "A. Autosomal recessive", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/yoiQXPA0H4T86YudPiP31713266416.png"], "explanation": "<p>Correct Option A - Autosomal Recessiv\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/1mhiPqE16epkTizOyzFj1748415732.mp3", "video": ""}, {"text": "Which of the following diseases has an X-linked recessive pattern of inheritance?", "options": [{"label": "A", "text": "Hurler syndrome", "correct": false}, {"label": "B", "text": "Thalassemia", "correct": false}, {"label": "C", "text": "Hereditary spherocytosis", "correct": false}, {"label": "D", "text": "G6PD deficiency", "correct": true}], "correct_answer": "D. G6PD deficiency", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - <span class=\"customMeta\" data-dictid=\"96985248371692777188cfb38ca861\">G6PD</span> D\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/3L9kOuLRWfnKtYqy1dY51748415368.mp3", "video": ""}, {"text": "Which chromosome is involved in myotonic dystrophy?", "options": [{"label": "A", "text": "Chromosome 19", "correct": true}, {"label": "B", "text": "Chromosome 20", "correct": false}, {"label": "C", "text": "Chromosome 21", "correct": false}, {"label": "D", "text": "Chromosome 22", "correct": false}], "correct_answer": "A. Chromosome 19", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">Chromosome</span> 19\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/wLSJEQOCLWIBiMpXdWlB1748415126.mp3", "video": ""}, {"text": "Which of the following diseases is most commonly associated with Down syndrome?", "options": [{"label": "A", "text": "Parkinson Disease", "correct": false}, {"label": "B", "text": "Alzheimer disease", "correct": true}, {"label": "C", "text": "Schizophrenia", "correct": false}, {"label": "D", "text": "Huntington disease", "correct": false}], "correct_answer": "B. Alzheimer disease", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Alzh\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ctybOYTxZ0967JzAoUVL1748414652.mp3", "video": ""}, {"text": "Alpha-1 antitrypsin is the major inhibitor of which enzyme ?", "options": [{"label": "A", "text": "Catalase", "correct": false}, {"label": "B", "text": "Collagenase", "correct": false}, {"label": "C", "text": "Elastase", "correct": true}, {"label": "D", "text": "Phospholipase", "correct": false}], "correct_answer": "C. Elastase", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - E\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/5abR3SgzS27LQPe78wCJ1748373088.mp3", "video": ""}, {"text": "All of the following are features of fragile X syndrome, except :", "options": [{"label": "A", "text": "Trinucleotide mutation in FMR-1 gene", "correct": false}, {"label": "B", "text": "Mental retardation", "correct": false}, {"label": "C", "text": "Microorchidism", "correct": true}, {"label": "D", "text": "Large everted ears", "correct": false}], "correct_answer": "C. Microorchidism", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Microorch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/uCPWpgc2YWxSTIPzfwNf1748372942.mp3", "video": ""}, {"text": "A boy was diagnosed with a medical condition that is believed to have been passed down from his grandmother to his father, and now to him. What is the pattern of inheritance in this case ?", "options": [{"label": "A", "text": "X-linked dominant", "correct": false}, {"label": "B", "text": "X-linked recessive", "correct": false}, {"label": "C", "text": "Autosomal dominant", "correct": true}, {"label": "D", "text": "Autosomal recessive", "correct": false}], "correct_answer": "C. Autosomal dominant", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/LvR2VwfshHJqQUHzjU2w1712123892.png"], "explanation": "<p>Correct Option C - Autosomal D\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/AYvVsfB0XOo5s7HVUXBv1748370303.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 54 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is not a part of the vaginal epithelium?", "options": [{"label": "A", "text": "Superficial squamous cells", "correct": false}, {"label": "B", "text": "Intermediate squamous cells", "correct": false}, {"label": "C", "text": "Columnar cells", "correct": true}, {"label": "D", "text": "Parabasal cells", "correct": false}], "correct_answer": "C. Columnar cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2sPJAsnjjXQ9BK4KO0ka1736994464.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:656px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Functions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Superficial layer</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">It forms the outermost protective barrier, eventually shed from the surface.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intermediate layer</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Provide structural support to the <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> and contribute to the <span class=\"customMeta\" data-dictid=\"facd67f6341692777200653d383689\">thickness</span> and <span class=\"customMeta\" data-dictid=\"b11364e7ed169277719777251a2bfe\">resilience</span> of the <span class=\"customMeta\" data-dictid=\"9a1e50b8221692777201b95b66c9de\">vaginal</span> tissue.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parabasal layer</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serve as transitional cells between the <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> and <span class=\"customMeta\" data-dictid=\"cf8f491dba169277719075ce2b5594\">intermediate</span> layers, reflecting ongoing epithelial <span class=\"customMeta\" data-dictid=\"a13747deff16927772016cfbf6b284\">turnover</span> and differentiation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Basal layer</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mitotically active and serves as the regenerative source for the epithelium.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which strain of the HPV virus is responsible for causing Condyloma acuminatum?", "options": [{"label": "A", "text": "HPV 6 &amp; 11", "correct": true}, {"label": "B", "text": "HPV 16 &amp; 18", "correct": false}, {"label": "C", "text": "HPV 6 &amp; 16", "correct": false}, {"label": "D", "text": "HPV 11 &amp; 18", "correct": false}], "correct_answer": "A. HPV 6 & 11", "question_images": ["https://image.prepladder.com/content/dOqrNJicBbhPMk2x2R5J1736994627.png"], "explanation_images": ["https://image.prepladder.com/content/upNccBrlsfmq4ozVIomc1737645802.png", "https://image.prepladder.com/content/DXuzzW31uSZH1TrfpoTw1736994696.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old sexually active female presents with foul-smelling vaginal discharge and dysuria. Upon examination of the cervix, the following appearance is noted. Wet mount microscopy reveals the findings shown in the image below. Which of the following is most likely responsible for this presentation?", "options": [{"label": "A", "text": "Trichomonas vaginalis", "correct": true}, {"label": "B", "text": "Candida", "correct": false}, {"label": "C", "text": "Herpes simplex virus", "correct": false}, {"label": "D", "text": "Human Papilloma virus", "correct": false}], "correct_answer": "A. Trichomonas vaginalis", "question_images": ["https://image.prepladder.com/content/tHaFQAXzx9lCiK4mmEAz1736995008.png", "https://image.prepladder.com/content/rOMSobiXfPIKZvXktqBQ1736995071.png"], "explanation_images": ["https://image.prepladder.com/content/jsyzfHVZrFLkPcBE8Tnf1737645948.png", "https://image.prepladder.com/content/ESwnLXw1ReL9d7LZFefK1736995193.png", "https://image.prepladder.com/content/wwbloSJEKaki0bfhUdPI1736995359.png", "https://image.prepladder.com/content/EUCWja8crXeQx8BHRxUZ1736995448.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old woman complains of persistent itching and redness in her vulvar area. On examination, well-defined, erythematous plaques with an eczematous appearance are noted. A biopsy reveals large cells with pale cytoplasm and positive staining for mucopolysaccharides. Immunohistochemical analysis shows positive staining for cytokeratin 7. Based on these findings, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Bowen's disease of the vulva", "correct": false}, {"label": "B", "text": "Extramammary Paget's disease", "correct": true}, {"label": "C", "text": "Papillary Hidradenoma", "correct": false}, {"label": "D", "text": "Squamous cell carcinoma", "correct": false}], "correct_answer": "B. Extramammary Paget's disease", "question_images": ["https://image.prepladder.com/content/ysQqXddUXieUBnaY2R2x1736995580.png", "https://image.prepladder.com/content/4TP0LytnyEUZGuSCZmcx1736995713.png"], "explanation_images": ["https://image.prepladder.com/content/GxmQLLeCq5tIkG5tdCqZ1736995776.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following has a strong association with clear cell adenocarcinoma of the vagina?", "options": [{"label": "A", "text": "Male partner who has multiple sexual partners", "correct": false}, {"label": "B", "text": "In utero exposure to diethylstilbestrol", "correct": true}, {"label": "C", "text": "HPV infection", "correct": false}, {"label": "D", "text": "Sexual activity at a young age", "correct": false}], "correct_answer": "B. In utero exposure to diethylstilbestrol", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 4-year-old girl presents to the pediatric clinic with complaints of vaginal bleeding and a visible mass protruding from her vagina. On examination, a polypoid mass with a \"grape-like\" appearance is observed. A biopsy is taken, and immunohistochemical staining is positive for desmin. Which of the following will show as a biopsy finding?", "options": [{"label": "A", "text": "Cells with small protrusions of cytoplasm from one end", "correct": true}, {"label": "B", "text": "Marked atypia of cells with numerous keratin pearls", "correct": false}, {"label": "C", "text": "Columnar mucinous epithelium", "correct": false}, {"label": "D", "text": "Fibrous stroma covered by mucus-secreting endocervical glands", "correct": false}], "correct_answer": "A. Cells with small protrusions of cytoplasm from one end", "question_images": ["https://image.prepladder.com/content/9CEH7gXF7qdNTmnczpVj1737646066.png"], "explanation_images": ["https://image.prepladder.com/content/wqs9yYYskxnrvfIRR1JG1736996175.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is an advantage of liquid-based cytology (LBC) over the conventional Pap smear?", "options": [{"label": "A", "text": "Cost-effective", "correct": false}, {"label": "B", "text": "More widely available in resource-limited settings", "correct": false}, {"label": "C", "text": "Adequacy of 8,000-12,000 epithelial cells", "correct": false}, {"label": "D", "text": "Allows simultaneous HPV testing", "correct": true}], "correct_answer": "D. Allows simultaneous HPV testing", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:655px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Conventional <span class=\"customMeta\" data-dictid=\"25c6ce766c1692777184ab9a40305c\">Cervical</span> Screening (Pap Smear)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Liquid-Based <span class=\"customMeta\" data-dictid=\"f3b9227a231692777185b5c30d8602\">Cytology</span> (LBC)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Sample Collection</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cells are collected using a <span class=\"customMeta\" data-dictid=\"2cd284701016927771984ff3e4605b\">spatula</span> or brush and smeared directly onto a glass slide.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cells are collected using a brush and then rinsed into a <span class=\"customMeta\" data-dictid=\"cd235a18081692777202343e31b264\">vial</span> containing a <span class=\"customMeta\" data-dictid=\"d3a8a234c61692777196ab718189bf\">preservative</span> solution.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Processing Time</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Typically longer due to manual preparation and staining.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Faster automated processing and staining.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Sensitivity and Specificity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Lower sensitivity and <span class=\"customMeta\" data-dictid=\"e70dd3ea9916927771988faba61d64\">specificity</span> compared to LBC.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Higher sensitivity and <span class=\"customMeta\" data-dictid=\"e70dd3ea9916927771988faba61d64\">specificity</span> for detecting abnormalities.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Cost</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Generally lower cost.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Higher cost due to specialized equipment and supplies. <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Follow-up Testing</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Additional sample collection may be needed if the initial sample is inadequate.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Usually provides enough samples for additional tests (e.g., <span class=\"customMeta\" data-dictid=\"6bca6e988d1692777189167b791930\">HPV</span> testing) without recollection. <strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Adequacy of cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>8000-12000 epithelial cells/ 10 <span class=\"customMeta\" data-dictid=\"b5e72d80ba16927771893e46220f90\">hpf</span> <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>5000 epithelial cells/10 hpf</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Resource limited setting</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Available in resource-limited settings <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Specialized equipment and infrastructure are needed</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman comes to the OPD for regular Pap smear screening. The smear suggests a low-grade squamous intraepithelial lesion. Which of the following abnormal cell types was most likely seen on the smear?", "options": [{"label": "A", "text": "Doderlein cells", "correct": false}, {"label": "B", "text": "Hobnail cells", "correct": false}, {"label": "C", "text": "Arias-Stella reaction cells", "correct": false}, {"label": "D", "text": "Koilocytes", "correct": true}], "correct_answer": "D. Koilocytes", "question_images": ["https://image.prepladder.com/content/j8y8ojioQob8HX3LwKoU1737647464.png"], "explanation_images": ["https://image.prepladder.com/content/0ev8n5Xut7LCTTCArXQr1736996510.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/wxfzWYlbWFOMJgJAuzaT1746472701.mp3", "video": ""}, {"text": "Which of the following risk factors is not typically associated with cervical cancer?", "options": [{"label": "A", "text": "Smoking", "correct": false}, {"label": "B", "text": "Multiple sexual partners", "correct": false}, {"label": "C", "text": "Oral contraceptive pill use", "correct": false}, {"label": "D", "text": "Nulliparity", "correct": true}], "correct_answer": "D. Nulliparity", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old woman undergoes a routine gynecological examination. Abnormalities are detected on her pap smear, and colposcopy-guided biopsy reveals dysplastic changes involving two-thirds of the cervical epithelium. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Cervical intraepithelial neoplasia 1", "correct": false}, {"label": "B", "text": "Cervical intraepithelial neoplasia 2", "correct": true}, {"label": "C", "text": "Cervical intraepithelial neoplasia 3", "correct": false}, {"label": "D", "text": "Invasive cervical carcinoma", "correct": false}], "correct_answer": "B. Cervical intraepithelial neoplasia 2", "question_images": ["https://image.prepladder.com/content/yRiol5Y2KQ3AzWMxcFIZ1737646266.png"], "explanation_images": ["https://image.prepladder.com/content/YC5nmVaVIJHIHAO5h7Kh1736996979.png", "https://image.prepladder.com/content/w1Xxvnmi9r1RWQfY8LIB1737646356.png", "https://image.prepladder.com/content/pvGF0CSUrS1d4WgATWln1736997053.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:622px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Grade</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>HPE</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CIN 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"\" data-author=\" Syed Hassan A. Kazmi, mahshid mir, Aditya Govindavarjhulla, Charmaine Patel, Lakshmi Gopalakrishnan and Varun Kumar\" data-hash=\"\" data-license=\"CC BY/SA\" data-source=\"https://www.wikidoc.org/index.php/Cervical_intraepithelial_neoplasia\" data-tags=\"\" height=\"658\" src=\"https://image.prepladder.com/content/YC5nmVaVIJHIHAO5h7Kh1736996979.png\" width=\"500\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low-grade <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span> <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> of <span class=\"customMeta\" data-dictid=\"25c6ce766c1692777184ab9a40305c\">cervical</span> <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> <span class=\"customMeta\" data-dictid=\"e212826c171692777193374ca34435\">neoplasia</span> with koilocytic <span class=\"customMeta\" data-dictid=\"79886dc4391692777182791548ca21\">atypia</span> showing <span class=\"customMeta\" data-dictid=\"06123ff61a1692777182e19b790ebc\">atypical</span> cells in the lower 1/3rd of the epithelium.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CIN 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"IARC, WHO\" data-hash=\"\" data-license=\"NA\" data-source=\"https://screening.iarc.fr/atlasviadetail.php?Index=22&e=\" data-tags=\"\" height=\"3125\" src=\"https://image.prepladder.com/content/w1Xxvnmi9r1RWQfY8LIB1737646356.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High-grade <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span> <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> (HSIL) with progressive <span class=\"customMeta\" data-dictid=\"79886dc4391692777182791548ca21\">atypia</span> and expansion of the <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> cells in the lower 2/3rd of the epithelial thickness</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CIN 3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"\" data-author=\"Sarahkayb\" data-hash=\"\" data-license=\"CC BY-SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Intraepithelial_neoplasia\" data-tags=\"\" height=\"329\" src=\"https://image.prepladder.com/content/pvGF0CSUrS1d4WgATWln1736997053.png\" width=\"500\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">HSIL with <span class=\"customMeta\" data-dictid=\"89275101301692777186567d1912a0\">diffuse</span> atypia, loss of maturation, and expansion of the <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> cells to the entire length of the epithelial surface.</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is true regarding the squamous cell carcinoma of the cervix? HPV types 16 and 18 are the most common HPV types identified in invasive cervical cancer. The most common site of metastasis is the lungs. E6 protein interferes with the activity of the tumor suppressor proteins p53. Squamous cell carcinoma is the most common histologic subtype.", "options": [{"label": "A", "text": "1,2,3,4", "correct": true}, {"label": "B", "text": "1,2,3", "correct": false}, {"label": "C", "text": "1,3,4", "correct": false}, {"label": "D", "text": "Only 1", "correct": false}], "correct_answer": "A. 1,2,3,4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ngehTRs1znZsUkN4N4Dt1736997235.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 21 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 52-year-old woman presents with abdominal bloating, discomfort, and increased abdominal girth. Ascites and a palpable pelvic mass are noted on examination. Histopathological examination shows papillary structures with atypical epithelial cells containing psammoma bodies and elevated CA-125 levels. What is the likely diagnosis?", "options": [{"label": "A", "text": "Mucinous cystadenocarcinoma", "correct": false}, {"label": "B", "text": "Endometrioid carcinoma", "correct": false}, {"label": "C", "text": "Serous cystadenocarcinoma", "correct": true}, {"label": "D", "text": "Clear cell carcinoma", "correct": false}], "correct_answer": "C. Serous cystadenocarcinoma", "question_images": ["https://image.prepladder.com/content/RqUlY4hPuCeK7YTVQN2d1737645277.png"], "explanation_images": ["https://image.prepladder.com/content/Gx5yt4lGwvrmyUkP1fdO1737645290.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the extent of nonsquamous growth present in Grade 2 endometrial carcinoma?", "options": [{"label": "A", "text": "5% or less nonsquamous solid growth pattern", "correct": false}, {"label": "B", "text": "6 - 50% nonsquamous solid growth pattern", "correct": true}, {"label": "C", "text": "&gt; 50% nonsquamous solid growth pattern", "correct": false}, {"label": "D", "text": "&gt;75% nonsquamous solid growth pattern", "correct": false}], "correct_answer": "B. 6 - 50% nonsquamous solid growth pattern", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grade 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>5% or less nonsquamous solid growth pattern (well-differentiated) with preserved <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> architecture (Option A)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grade 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>6 - 50% nonsquamous solid growth pattern (moderately differentiated) (Option B)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grade 3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>> 50% nonsquamous solid growth pattern (poorly differentiated)</p>\n<p>(Option C)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old woman presents with irregular vaginal bleeding and passage of grape-like clusters at ten weeks of gestation. Ultrasound reveals a heterogeneous pattern with fetal parts. On histopathology, some villi appear enlarged, and there is a presence of fetal tissue admixed with abnormal placental tissue. Which of the following is true regarding this condition?", "options": [{"label": "A", "text": "High risk of invasive mole", "correct": true}, {"label": "B", "text": "Resulting from androgenetic fertilisation", "correct": false}, {"label": "C", "text": "Immunostaining for p57 is negative", "correct": false}, {"label": "D", "text": "High risk of malignancy", "correct": false}], "correct_answer": "A. High risk of invasive mole", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/fnvAFCQFDbV74FRLXuNT1732862131.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:693px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Partial Mole</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Complete Mole</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genetic Origin</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal egg fertilised by more than one sperm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Egg with lost chromosomes (empty egg) fertilised by one or two sperms</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chromosomal Composition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Triploid or occasionally tetraploid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diploid: 90% due to <span class=\"customMeta\" data-dictid=\"097b0c94c81692777181859cbfd3eb\">Androgenesis</span> (single <span class=\"customMeta\" data-dictid=\"8dc15ef09e1692777198320917e46b\">sperm</span> duplication); 10% due to Dispermy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Fetal Tissue</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Absent</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk of Malignancy</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High risk of persistent molar disease but not associated with choriocarcinoma</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High risk of persistent/invasive mole (15%);</p>\n<p>2.5% risk of choriocarcinoma</p>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microscopic Features</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fraction of <span class=\"customMeta\" data-dictid=\"bbea63556f1692777202e8abdd66a4\">villi</span> enlarged, <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> trophoblastic hyperplasia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>All/most <span class=\"customMeta\" data-dictid=\"bbea63556f1692777202e8abdd66a4\">villi</span> enlarged, <span class=\"customMeta\" data-dictid=\"89275101301692777186567d1912a0\">diffuse</span> trophoblastic hyperplasia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunostaining for p57</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive (p57 gene is maternally expressed)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative (p57 gene is paternally imprinted or inactivated)</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:729px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Partial Mole</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Complete Mole</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genetic Origin</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal egg fertilised by more than one sperm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Egg with lost chromosomes (empty egg) fertilised by one or two sperms</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genetic Makeup</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Triploid or tetraploid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diploid: 90% due to Androgenesis; 10% due to Dispermy</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Fetal Tissue</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Absent</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk of Malignancy</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No risk of choriocarcinoma</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2.5% risk of choriocarcinoma</p>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microscopic Features</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fraction of <span class=\"customMeta\" data-dictid=\"bbea63556f1692777202e8abdd66a4\">villi</span> enlarged, <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> trophoblastic hyperplasia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>All/most <span class=\"customMeta\" data-dictid=\"bbea63556f1692777202e8abdd66a4\">villi</span> enlarged, <span class=\"customMeta\" data-dictid=\"89275101301692777186567d1912a0\">diffuse</span> trophoblastic hyperplasia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunostaining for p57</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 29-year-old woman at 11 weeks of gestation presents with vaginal bleeding and passage of grape-like clusters. Ultrasound shows a \"snowstorm\" appearance without fetal parts. On histopathology, most villi are enlarged with central cistern formation and the absence of fetal tissue. Which of the following is characteristic of this condition?", "options": [{"label": "A", "text": "Presence of fetal tissue and partially developed placenta", "correct": false}, {"label": "B", "text": "Diploid karyotype, typically 46, XX or 46, XY, with no fetal tissue", "correct": true}, {"label": "C", "text": "Triploid karyotype, typically 69, XXX or 69, XXY, with some fetal tissue", "correct": false}, {"label": "D", "text": "Normal-sized chorionic villi with no trophoblastic proliferation", "correct": false}], "correct_answer": "B. Diploid karyotype, typically 46, XX or 46, XY, with no fetal tissue", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/AIROtlcIsa2bWpAdS3Wi1737647970.png", "https://image.prepladder.com/content/Aock7QOI4OSJadB6plQc1737647830.png", "https://image.prepladder.com/content/8Yh2S9mbgAzmKyLo5jll1737647889.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old postmenopausal woman presents with progressive abdominal distension, shortness of breath, and pelvic pain. Physical examination reveals ascites and a right-sided pleural effusion. Imaging reveals a solid ovarian mass. A biopsy of the mass shows benign ovarian fibroma. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Meigs syndrome", "correct": true}, {"label": "B", "text": "Pseudo Meigs syndrome", "correct": false}, {"label": "C", "text": "Fitz-Hugh-Curtis syndrome", "correct": false}, {"label": "D", "text": "Mayer-Rokitansky-Küster-Hauser syndrome", "correct": false}], "correct_answer": "A. Meigs syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/NFUTfwaCEhdebovDHIuT1737647676.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following tumours is typically NOT associated with coffee bean nuclei?", "options": [{"label": "A", "text": "Chondroblastoma", "correct": false}, {"label": "B", "text": "Granulosa cell tumour", "correct": false}, {"label": "C", "text": "Brenner tumour", "correct": false}, {"label": "D", "text": "Yolk sac tumour", "correct": true}], "correct_answer": "D. Yolk sac tumour", "question_images": ["https://image.prepladder.com/content/GIJ4N8W6OdJUGO9bOxoK1737647173.png"], "explanation_images": ["https://image.prepladder.com/content/bsjycUmO9IcigfICDIL91737647248.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old postmenopausal woman presents with abnormal uterine bleeding and a pelvic mass. An ultrasound reveals a solid ovarian mass. The mass is surgically removed, and the HPE shows small, follicle-like structures filled with eosinophilic material. Which histological feature is most likely associated with this ovarian tumour?", "options": [{"label": "A", "text": "Spindle cells with lipid droplets", "correct": false}, {"label": "B", "text": "Call-Exner bodies", "correct": true}, {"label": "C", "text": "Reinke crystalloids", "correct": false}, {"label": "D", "text": "Signet ring cells", "correct": false}], "correct_answer": "B. Call-Exner bodies", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/XBRE33ZAnlZUx8uDZeKB1737647056.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:781px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sertoli-Leydig tumour,</strong></p>\n<p><strong>Pure Leydig tumour (or <span class=\"customMeta\" data-dictid=\"2dcf6f16b41692777189db65e9763e\">Hilus</span> cell tumour) </strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Fibroma, Thecoma, Fibrothecoma</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Granulosa Cell Tumor</strong></p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Derived from</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sertoli or Leydig cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ovarian stroma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Granulosa cells of ovarian follicle</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age of Occurrence</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Second and third decades</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Any age</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Postmenopausal (adult type), any age (juvenile type)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated symptoms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Abnormal sexual development or Virilization</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Associated with <span class=\"customMeta\" data-dictid=\"c8d8df68ed16927771924d928ea76f\">Meigs syndrome</span> ( <span class=\"customMeta\" data-dictid=\"1a0a43d74e16927772004473a05ae3\">triad</span> of <span class=\"customMeta\" data-dictid=\"1bbae82f1f16927771824f797639fa\">benign</span> ovarian <span class=\"customMeta\" data-dictid=\"984f7ab3d31692777202759795db32\">fibroma</span> + ascites+ pleural effusion) and <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> <span class=\"customMeta\" data-dictid=\"d61ced9a671692777193e04a03c423\">nevus</span> syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Precocious sexual development in juveniles or <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> <span class=\"customMeta\" data-dictid=\"59ff8b38191692777201150e72ebc3\">uterine</span> bleeding, <span class=\"customMeta\" data-dictid=\"32312bbe131692777187438292b62d\">endometrial hyperplasia</span> (carcinoma) in adults</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histological features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reinke crystalloids (in pure Leydig cell tumours)</p>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Well-differentiated fibroblasts (fibroma),<br/>\n\t\t\tplump <span class=\"customMeta\" data-dictid=\"fc5f7fef0e169277719952d19a4532\">spindle</span> cells with <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> droplets (thecomas)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Call-Exner bodies, Coffee bean nuclei</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mutations & Markers</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mutations in DICER1 (which encodes endonuclease)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vimentin +,<br/>\n\t\t\tThecoma: <span class=\"customMeta\" data-dictid=\"d0325a8d541692777194533cadb1a6\">Oil Red</span> O +ve<br/>\n\t\t\tFibroma: <span class=\"customMeta\" data-dictid=\"d0325a8d541692777194533cadb1a6\">Oil Red</span> O -ve</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated <span class=\"customMeta\" data-dictid=\"310439225b1692777190ac31461dbd\">inhibin</span> levels, CD99+, and FOXL2 mutations (in adult cases)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low <span class=\"customMeta\" data-dictid=\"1d849ebc9b1692777197d4af1fa8d2\">recurrence</span> or <span class=\"customMeta\" data-dictid=\"d3251bfb0b1692777192b069d7ba4a\">metastasis</span> rate (<5%)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Benign; Rarely <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> (fibrosarcomas)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Potentially <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> with unpredictable behaviour;</p>\n<p>10-year survival rate 85%</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/BUkmNVPpYKsPrTCdSPVw1747671449.mp3", "video": ""}, {"text": "A 19-year-old woman presents with lower abdominal pain and a rapidly enlarging pelvic mass. Imaging reveals a solid and cystic ovarian tumour. A biopsy of the mass shows immature neural elements and other embryonic-like tissues, indicating a high risk of malignancy. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Mature teratoma", "correct": false}, {"label": "B", "text": "Immature teratoma", "correct": true}, {"label": "C", "text": "Carcinoid tumour", "correct": false}, {"label": "D", "text": "Monodermal teratoma", "correct": false}], "correct_answer": "B. Immature teratoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/g7SCIo7R87Ka5WnnWRJH1737646831.png", "https://image.prepladder.com/content/aLGB9aDcp0PHmkkGeNff1737646335.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old woman presents with severe vaginal bleeding and lower abdominal pain six months postpartum. USG reveals a heterogeneous uterine mass with haemorrhage and necrosis, raising suspicion of choriocarcinoma. What tumour marker is most likely elevated in her condition?", "options": [{"label": "A", "text": "CA-125", "correct": false}, {"label": "B", "text": "LDH", "correct": false}, {"label": "C", "text": "AFP", "correct": false}, {"label": "D", "text": "HCG", "correct": true}], "correct_answer": "D. HCG", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Tumor Marker</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Associated Tumors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>AFP</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumor<strong> (Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>β-hCG</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Choriocarcinoma<strong> </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>LDH</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Dysgerminoma<strong> </strong><strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>CA-125</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Ovarian epithelial tumours (e.g., <span class=\"customMeta\" data-dictid=\"3963a2e0fa169277719874304f5705\">Serous</span> carcinoma)<strong> </strong><strong>(Option A)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 16-year-old female presents with abdominal pain, distension, and a large pelvic mass accompanied by ascites. Elevated serum alpha-fetoprotein levels are detected. Surgical resection of the mass reveals histopathological findings depicted in the image. What is the probable diagnosis?", "options": [{"label": "A", "text": "Endodermal sinus tumor", "correct": true}, {"label": "B", "text": "Dysgerminoma", "correct": false}, {"label": "C", "text": "Choriocarcinoma", "correct": false}, {"label": "D", "text": "Teratoma", "correct": false}], "correct_answer": "A. Endodermal sinus tumor", "question_images": ["https://image.prepladder.com/content/dPaAiSL4YO7DWgAhnA0H1737645383.png"], "explanation_images": ["https://image.prepladder.com/content/31khabegxTieUoOg09nH1737645481.png", "https://image.prepladder.com/content/BRET1dIPEtjBzgqBZrb61737645556.png", "https://image.prepladder.com/content/6fOIYzlLdXGZaqlGdIoc1737645836.png", "https://image.prepladder.com/content/CRWa7vWSaKdzjcWu0Uq01737645631.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:664px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tumour type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histological feature</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Endodermal <span class=\"customMeta\" data-dictid=\"b0046463171692777198e0beea83e7\">Sinus</span> Tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Presence of Schiller-Duval bodies.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Jensflorian\" data-hash=\"\" data-license=\"CC BY SA3.O\" data-source=\"https://commons.wikimedia.org/wiki/File:Yolk_sac_tumor_schiller_duval_body.jpg\" data-tags=\"\" height=\"1299\" src=\"https://image.prepladder.com/content/31khabegxTieUoOg09nH1737645481.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dysgerminoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>‘Fried egg appearance’ (large cells with clear <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and central nuclei).</li>\n<li>Lymphocytic <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> in the <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> septa.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"CoRus13\" data-hash=\"\" data-license=\"CC BY 1.0- Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:Dysgerminoma,_high_mag.jpg\" data-tags=\"\" height=\"807\" src=\"https://image.prepladder.com/content/BRET1dIPEtjBzgqBZrb61737645556.png\" width=\"1196\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Choriocarcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Consists of cytotrophoblasts and syncytiotrophoblasts.</li>\n<li>It may show haemorrhage and necrosis.</li>\n</ul>\n<p> </p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Choriocarcinoma_-2-_very_high_mag.jpg\" data-tags=\"\" height=\"807\" src=\"https://image.prepladder.com/content/6fOIYzlLdXGZaqlGdIoc1737645836.png\" width=\"1196\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Teratoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>They comprise tissues from all three <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell layers (ectoderm, mesoderm, and endoderm), such as skin, hair,teeth, and <span class=\"customMeta\" data-dictid=\"b00388be25169277719369b3ab059f\">neural</span> tissue.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Ed uthman\" data-hash=\"\" data-license=\"OPEN ACCESS\" data-source=\"https://commons.wikimedia.org/wiki/File:Mature_cystic_teratoma_of_ovary.jpg\" data-tags=\"\" height=\"988\" src=\"https://image.prepladder.com/content/CRWa7vWSaKdzjcWu0Uq01737645631.png\" width=\"1111\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 34-year-old woman with irregular menstrual cycles and difficulty conceiving undergoes an endometrial biopsy. HPE reveals glands with tall columnar epithelial cells with subnuclear vacuoles. Which phase of the endometrial cycle is most likely being discussed here?", "options": [{"label": "A", "text": "Proliferative phase", "correct": false}, {"label": "B", "text": "Early secretory phase", "correct": true}, {"label": "C", "text": "Late secretory phase", "correct": false}, {"label": "D", "text": "Menstrual phase", "correct": false}], "correct_answer": "B. Early secretory phase", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/E1OLCCHEBSZeeCntwETp1737632888.png", "https://image.prepladder.com/content/CV3zVyVjYupQHmzRtfwc1737633144.png", "https://image.prepladder.com/content/2Y3uaiBLoZ9KmR7tzfL71737632973.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:656px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Phase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Day </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Morphological changes</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proliferative phase</strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Day 5-14</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>The rapid growth of glands and <span class=\"customMeta\" data-dictid=\"c077aecdcd1692777199503c836d9c\">stroma</span> from the <span class=\"customMeta\" data-dictid=\"849623f7a71692777182fb29760194\">basalis</span> layer and tall columnar cells with numerous <span class=\"customMeta\" data-dictid=\"e0da80f7b91692777192668c299922\">mitotic figures</span> are seen.</li>\n<li>Absence of <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> <span class=\"customMeta\" data-dictid=\"9b0ae3750916927771986c15d4ff4d\">secretion</span> or vacuolation.</li>\n<li>Stroma is composed of <span class=\"customMeta\" data-dictid=\"fc5f7fef0e169277719952d19a4532\">spindle</span> cells with minimal cytoplasm.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Proliferative_phase_endometrium_--_intermed_mag.jpg\" data-tags=\"\" height=\"988\" src=\"https://image.prepladder.com/content/E1OLCCHEBSZeeCntwETp1737632888.png\" width=\"669\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ovulatory phase </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Day 14</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mature <span class=\"customMeta\" data-dictid=\"b0c3f6b8901692777203d0446fe1f4\">follicle</span> <span class=\"customMeta\" data-dictid=\"e73553a3a5169277719787fd5f4680\">rupture</span> and releases oocyte.</li>\n<li>Watery <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> is produced in the cervix, which facilitates <span class=\"customMeta\" data-dictid=\"8dc15ef09e1692777198320917e46b\">sperm</span> passage</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Secretory phase </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Day 14-28</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Early <span class=\"customMeta\" data-dictid=\"9e7aec9ff416927771984a1e3100b7\">secretory</span> phase: </strong>Presence of subnuclear <span class=\"customMeta\" data-dictid=\"ac3113e9291692777201fabc2ed675\">vacuolation</span> in the <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> epithelium. <strong>(</strong><strong>Option B)</strong></p>\n<p> </p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Early_secretory_phase_endometrium_--_intermed_mag.jpg\" data-tags=\"\" height=\"1608\" src=\"https://image.prepladder.com/content/CV3zVyVjYupQHmzRtfwc1737633144.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p><strong>Late <span class=\"customMeta\" data-dictid=\"9e7aec9ff416927771984a1e3100b7\">secretory</span> phase: </strong></p>\n<ul>\n<li>Basal vacuoles gradually move to the <span class=\"customMeta\" data-dictid=\"c6223a27fb169277718147405290e1\">apical</span> surface.</li>\n<li>Glands become tortuous. (Serrated or Sawtooth appearance)</li>\n<li>Stromal changes include stromal cell <span class=\"customMeta\" data-dictid=\"3baac9012a1692777189cb4dc70c04\">hypertrophy</span> <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of neutrophils and lymphocytes. <strong>(Option C)</strong></li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Secretory_phase_endometrium_--_low_mag.jpg\" data-tags=\"\" height=\"1387\" src=\"https://image.prepladder.com/content/2Y3uaiBLoZ9KmR7tzfL71737632973.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Menstrual phase </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Day 1-5</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Breakdown of the <span class=\"customMeta\" data-dictid=\"7e902103fb16927771857729aade8b\">corpus</span> luteum and the subsequent drop in <span class=\"customMeta\" data-dictid=\"183d374ac91692777196c63c850299\">progesterone</span> levels.</li>\n<li>The functional layer of the <span class=\"customMeta\" data-dictid=\"2f1603da6716927771878d0cbdd372\">endometrium</span> breaks down, leading to <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> within the <span class=\"customMeta\" data-dictid=\"c077aecdcd1692777199503c836d9c\">stroma</span> and the start of the next <span class=\"customMeta\" data-dictid=\"3a03cad6c616927771925038b55989\">menstrual</span> cycle. (Option D)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following. Tumors Genetic Mutation a) Serous tumors 1) PIK3CA b) Mucinous tumors 2) KRAS proto-oncogene c) Endometrioid carcinomas 3) PTEN d) Clear cell carcinomas 4) BRCA1 and BRCA2", "options": [{"label": "A", "text": "a-4,b-1,c-2,d-3", "correct": false}, {"label": "B", "text": "a-4,b-2,c-3,d-1", "correct": true}, {"label": "C", "text": "a-3,b-4,c-1,d-2", "correct": false}, {"label": "D", "text": "a-2,b-1,c-3,d-4", "correct": false}], "correct_answer": "B. a-4,b-2,c-3,d-1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/O3aDQusVvIFurHduNViw1737644843.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Surface Epithelial Tumor of Ovary</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Genetic association</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Serous tumours</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mutations in BRCA1 and BRCA2</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mucinous tumours</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mutations in KRAS</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Endometrioid carcinomas</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mutations in PTEN</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Clear cell carcinomas</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mutations in PIK3CA</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old woman presents with persistent dull lower abdominal pain and increased urinary frequency. A uterine ultrasound reveals a heterogeneous vascular mass with areas of necrosis. Biopsy results show spindle cells with significant atypia, high mitotic activity, and necrosis. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Endometriosis", "correct": false}, {"label": "B", "text": "Endometrial carcinoma", "correct": false}, {"label": "C", "text": "Leiomyoma", "correct": false}, {"label": "D", "text": "Leiomyosarcoma", "correct": true}], "correct_answer": "D. Leiomyosarcoma", "question_images": ["https://image.prepladder.com/content/FVQcd6fHpRAaJyCqi4YL1737644113.png"], "explanation_images": ["https://image.prepladder.com/content/tX0Ks9428zrmgS05AWzx1737644192.png", "https://image.prepladder.com/content/XrT4vuAwaImuG5MpB9K91737644126.png", "https://image.prepladder.com/content/HIFcXx7eDknCCkCetjEL1737644487.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Leiomyoma (Fibroid) </strong><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Leiomyosarcoma </strong><strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Type </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Benign</strong><strong> </strong>smooth muscle tumour of the myometrium.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Malignant</strong><strong> </strong>smooth muscle tumour of the myometrium.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Gene mutations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>MED12 gene </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Highly variable</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Cellular Atypia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Minimal to absent</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Prominent</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Mitotic Activity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Rare to absent</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Increased,<strong> </strong><strong>>10/10 hpf</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Gross Pattern</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Well-defined, encapsulated, whorled, firm, grey-white tumours varying in size</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Bulky masses that invade the <span class=\"customMeta\" data-dictid=\"59ff8b38191692777201150e72ebc3\">uterine</span> wall OR</li>\n<li>Polypoid masses that project into the lumen</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Microscopic Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Uniform bundles of smooth muscle cells with cigar-shaped nuclei.</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"CALICUT MEDICAL COLLEGE\" data-hash=\"\" data-license=\"CC BY 3.0\" data-source=\"https://ilovepathology.com/leiomyoma-uterus/\" data-tags=\"\" height=\"1999\" src=\"https://image.prepladder.com/content/tX0Ks9428zrmgS05AWzx1737644192.png\" width=\"1678\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Characterised by <span class=\"customMeta\" data-dictid=\"fc5f7fef0e169277719952d19a4532\">spindle</span> shaped smooth muscle cells with nuclear atypia, high mitotic index and tumour necrosis.</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"KGH\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Uterine_leiomyosarcoma_(2).jpg\" data-tags=\"\" height=\"988\" src=\"https://image.prepladder.com/content/XrT4vuAwaImuG5MpB9K91737644126.png\" width=\"1302\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Often present</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Risk of Metastasis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Virtually absent</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Can metastasise, particularly to the lungs</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old pregnant woman at 20 weeks gestation presents with acute onset of severe abdominal pain. On examination, she has a tender, firm uterine mass. Ultrasound shows a fibroid with heterogeneous echotexture and increased vascularity. What type of degeneration is most likely occurring in the fibroid?", "options": [{"label": "A", "text": "Hyaline degeneration", "correct": false}, {"label": "B", "text": "Calcific degeneration", "correct": false}, {"label": "C", "text": "Red degeneration", "correct": true}, {"label": "D", "text": "Myxoid degeneration", "correct": false}], "correct_answer": "C. Red degeneration", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/flYbX9N1k8RRVzbvFqR21737644038.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old woman presents with heavy menstrual bleeding, pelvic discomfort, and increased urinary frequency. Examination reveals an enlarged, irregular uterus, and imaging shows well-defined, solid myometrial masses.Which of the following genetic rearrangements is seen in leiomyomas?", "options": [{"label": "A", "text": "MED12", "correct": true}, {"label": "B", "text": "KIT", "correct": false}, {"label": "C", "text": "p53", "correct": false}, {"label": "D", "text": "BRAF", "correct": false}], "correct_answer": "A. MED12", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/MIBq5QyZeiD0if5annHI1737635284.png", "https://image.prepladder.com/content/IvlFvQd2FUx4Rtfxv17b1737635444.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old postmenopausal woman presents with abnormal uterine bleeding and pelvic discomfort. On examination, her uterus is mildly enlarged, and an endometrial biopsy reveals hyperplasia with atypia. Further investigation suggests endometrial carcinoma.Which of the following genes is not responsible for the pathogenesis of Endometrial carcinoma?", "options": [{"label": "A", "text": "PTEN", "correct": false}, {"label": "B", "text": "KRAS", "correct": false}, {"label": "C", "text": "CTNNB-1", "correct": false}, {"label": "D", "text": "ETV1", "correct": true}], "correct_answer": "D. ETV1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/RcjDQaVCYEkTiMMBCzWu1737635006.png", "https://image.prepladder.com/content/nGCl8p8rq6mvrBgWhTRu1737005330.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 49-year-old nulliparous woman with a history of irregular menses and breast cancer treated with tamoxifen presents with vaginal bleeding. Transvaginal ultrasound indicates irregular endometrial thickening, while biopsy confirms complex endometrial hyperplasia with atypia progressing to endometrioid carcinoma. Which of the following is not a risk factor for the above condition?", "options": [{"label": "A", "text": "Thin physique", "correct": true}, {"label": "B", "text": "Diabetes mellitus", "correct": false}, {"label": "C", "text": "Tamoxifen", "correct": false}, {"label": "D", "text": "Unopposed estrogenic stimulation of the uterus", "correct": false}], "correct_answer": "A. Thin physique", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:666px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type 1 Endometrial Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type 2 Endometrial Carcinoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>55-65 years of age</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More than 65 years of age</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Patient profile</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Obese; Perimenopausal woman</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thin; Postmenopausal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Unopposed <span class=\"customMeta\" data-dictid=\"a58dd68b011692777187eb72633aac\">estrogen</span> activity-like nulliparity<strong>(Option D)</strong></p>\n<p>Obesity</p>\n<p>PCOS</p>\n<p>Hypertension</p>\n<p>Diabetes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No such risk factor</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Morphology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endometrioid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serous; Clear cell; Mixed Mullerian</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Precursor </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endometrial hyperplasia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serous endometrial <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> carcinoma.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated Gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PTEN</p>\n<p>ARID <span class=\"customMeta\" data-dictid=\"45d7632a0216927771898df908d43b\">IA</span> (regulator of chromatin)</p>\n<p>KRAS</p>\n<p>PIK3CA</p>\n<p>POLE</p>\n<p>MLH1,MSH2,and MSH6 mutations associated with Lynch syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TP53</p>\n<p>Aneuploidy</p>\n<p>PIK3CA</p>\n<p>BRCA 1 and 2</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Spread </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Indolent; spreads via lymphatics</p>\n<p>Better prognosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Aggressive <span class=\"customMeta\" data-dictid=\"e47e248094169277719000b0ed02ea\">intraperitoneal</span> and <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> spread</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following genetic mutations is associated with Endometrial hyperplasia?", "options": [{"label": "A", "text": "BRCA 1 gene", "correct": false}, {"label": "B", "text": "PTEN gene", "correct": true}, {"label": "C", "text": "TP53 gene", "correct": false}, {"label": "D", "text": "BRCA 2 gene", "correct": false}], "correct_answer": "B. PTEN gene", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is NOT true about Adenomyosis?", "options": [{"label": "A", "text": "It presents with abnormal uterine bleeding.", "correct": false}, {"label": "B", "text": "Ectopic endometrial tissue is found at least 2.5 cm from the endometrial junction.", "correct": true}, {"label": "C", "text": "It is seen in pre-menopausal women.", "correct": false}, {"label": "D", "text": "Biopsy shows irregular nests of endometrial stroma arranged within the myometrium.", "correct": false}], "correct_answer": "B. Ectopic endometrial tissue is found at least 2.5 cm from the endometrial junction.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Y917KPHEc5GsAfMtXe851737633549.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old woman with chronic pelvic pain worsened during menstrual periods and accompanied by heavy bleeding, was found to have a 'chocolate' brown cyst on her ovaries during a laparoscopy. What is the most commonly accepted theory for the pathogenesis of this condition?", "options": [{"label": "A", "text": "Benign metastasis theory", "correct": false}, {"label": "B", "text": "Metaplastic theory", "correct": false}, {"label": "C", "text": "Extrauterine stem/progenitor cell theory", "correct": false}, {"label": "D", "text": "Regurgitation theory", "correct": true}], "correct_answer": "D. Regurgitation theory", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 30 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 42-year-old male presents with testicular pain and swelling. Physical examination reveals a palpable mass. Subsequent biopsy of the mass provides important diagnostic insights. Which of the following statements regarding sex cord-stromal tumours in males are true? A) They are classified into three main subtypes: Leydig cell and Sertoli cell tumours and yolk sac tumours. B) Sertoli cell tumours are commonly associated with hormonal abnormalities. C) Histologically, Leydig cell tumors demonstrate golden pigment with reinke crystals with eosinophilic cytoplasmic inclusions. D) Sertoli cell tumours are often associated with Carney’s complex and are typically malignant.", "options": [{"label": "A", "text": "A, B, C", "correct": false}, {"label": "B", "text": "A, C, D", "correct": false}, {"label": "C", "text": "C", "correct": true}, {"label": "D", "text": "A, B, C, D", "correct": false}], "correct_answer": "C. C", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/XpxAb6ayAPIOlH9HJPxS1736968914.png", "https://image.prepladder.com/content/lwWq4EYozAkjeOLswOWh1736968996.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Leydig cell tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Sertoli cell tumour</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hormonal involvement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It often involves androgens, oestrogens, and corticosteroids.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hormonally silent.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Conditions associated with</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Klinefelter syndrome.</li>\n<li>Cryptorchidism.</li>\n<li>Renal cell carcinoma.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Carney complex.</li>\n<li>Peutz-Jeghers syndrome.</li>\n<li>Familial <span class=\"customMeta\" data-dictid=\"bf1f32fbd81692777180c0d2485ab2\">adenomatous</span> polyposis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Malignancy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>10% (in adults)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>10%</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gross</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Circumscribed nodules, usually < 5 cm in diameter.</li>\n<li>They have a distinctive golden brown, <span class=\"customMeta\" data-dictid=\"d9ec45007b1692777189e3b26e44ca\">homogeneous</span> appearance on cut surfaces.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Firm, small nodules with a homogeneous</p>\n<p>grey-white to yellow cut surface.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>The tumour cells resemble their normal counterparts.</li>\n<li>They are large in size and have <strong>round or polygonal cell outlines</strong>, <strong>abundant</strong> <strong>granular <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> cytoplasm</strong>, and a <strong>round central nucleus.</strong></li>\n<li>The <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> frequently contains <strong>lipid droplets</strong>, <strong>vacuoles</strong>, or <strong>lipofuscin</strong> <span class=\"customMeta\" data-dictid=\"05e2e2617c16927771952bcbeea08b\">pigment</span> and, most characteristically, rod-shaped <strong>Reinke crystalloids</strong> (25% of the tumours).</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>The tumour cells are arranged in <strong>distinctive trabeculae</strong> that tend to <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> <strong>cord-like structures</strong> and <strong>tubules.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Image</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Mikael Häggström, M.D.\" data-hash=\"\" data-license=\"CC0\" data-source=\"https://en.wikipedia.org/wiki/Leydig_cell_tumour#/media/File:Histopathology_of_leydig_cell_tumor_of_the_ovary,_high_mag,_annotated.png\" data-tags=\"\" height=\"433\" src=\"https://image.prepladder.com/content/XpxAb6ayAPIOlH9HJPxS1736968914.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://librepathology.org/wiki/File:Sertoli_cell_tumour_high_mag.jpg\" data-tags=\"\" height=\"337\" src=\"https://image.prepladder.com/content/lwWq4EYozAkjeOLswOWh1736968996.png\" width=\"500\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old male presents with multiple, small, flesh-coloured growths on the shaft of his penis. A biopsy is performed, and histopathology reveals hyperkeratosis, acanthosis, and koilocytosis. Which of the following is the most likely causative agent of his condition?", "options": [{"label": "A", "text": "HPV 6 and 11", "correct": true}, {"label": "B", "text": "Treponema pallidum", "correct": false}, {"label": "C", "text": "HSV 2", "correct": false}, {"label": "D", "text": "Chlamydia trachomatis", "correct": false}], "correct_answer": "A. HPV 6 and 11", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/g2sIo8DTGgWToQF9gLzR1736969802.png", "https://image.prepladder.com/content/cDlHpRXSToZkuhsm4QN51736969866.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Gross</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Condylomata acuminata may arise in the external <span class=\"customMeta\" data-dictid=\"a6a00bd30e169277718892b3a6076c\">genitalia</span> or <span class=\"customMeta\" data-dictid=\"befda305051692777195a95ee0695a\">perineal</span> areas.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Histology</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>The lining cells frequently display <span class=\"customMeta\" data-dictid=\"2da8fc47cf169277719576cea1851f\">perinuclear</span> cytoplasmic vacuolisation (<strong>koilocytosis</strong>), which is a characteristic of <span class=\"customMeta\" data-dictid=\"6bca6e988d1692777189167b791930\">HPV</span> infection.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents with difficulty in urination and frequent nocturia. Digital rectal examination reveals a firm, irregular prostate. A subsequent prostate-specific antigen (PSA) test shows elevated levels. A transrectal ultrasound-guided prostate biopsy is performed, and the pathology report provides a Gleason score. Which of the following statements regarding the Gleason score in prostate cancer diagnosis is correct for this patient?", "options": [{"label": "A", "text": "The Gleason score indicates the stage of prostate cancer.", "correct": true}, {"label": "B", "text": "A Gleason score of 6 suggests a poorly differentiated tumor with a high risk of metastasis.", "correct": false}, {"label": "C", "text": "The Gleason score is determined by adding the two least common Gleason grades found in the tumor.", "correct": false}, {"label": "D", "text": "The Gleason score is irrelevant in determining the treatment approach for prostate cancer.", "correct": false}], "correct_answer": "A. The Gleason score indicates the stage of prostate cancer.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/yVWJLh19QF8mkIHNQ0de1736969685.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Grade group</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Score</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>≤6</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Only <strong>individual <span class=\"customMeta\" data-dictid=\"635650799116927771862d7cb568f4\">discrete</span> well-formed glands.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3 + 4</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Predominantly well-formed glands</strong> with a lesser component of poorly formed, fused or <span class=\"customMeta\" data-dictid=\"978aa37443169277718555206ddf9e\">cribriform</span> glands</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4 + 3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Predominantly poorly formed/fused/cribriform glands</strong> with a lesser component of well-formed glands</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>(4 + 4/3 + 5/5 + 3)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Only poorly formed/fused/cribriform glands or predominantly mix of well-formed glands and lack of glands</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>5</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>(4 + 5/5 + 4/5 + 5)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lack <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> formation (or with necrosis) with or without poorly formed/fused/cribriform glands</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/fNYRX1Wlg5aXUoSIfJm41747307204.mp3", "video": ""}, {"text": "A 60-year-old male presents with increased frequency, nocturia, and a weak urine stream. Digital rectal examination reveals an enlarged prostate with a palpable nodule. A prostate biopsy is performed, and histological examination is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Benign Prostatic Hyperplasia (BPH)", "correct": false}, {"label": "B", "text": "Prostate Adenocarcinoma", "correct": true}, {"label": "C", "text": "Prostatic Intraepithelial Neoplasia (PIN)", "correct": false}, {"label": "D", "text": "Chronic Prostatitis", "correct": false}], "correct_answer": "B. Prostate Adenocarcinoma", "question_images": ["https://image.prepladder.com/content/lUEcTFmULfKaJladAye81736969507.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a new biomarker used in Prostatic Cancer?", "options": [{"label": "A", "text": "NMP22", "correct": false}, {"label": "B", "text": "Thymidine kinase", "correct": false}, {"label": "C", "text": "NKX 3.1", "correct": true}, {"label": "D", "text": "PLAP", "correct": false}], "correct_answer": "C. NKX 3.1", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a protective factor associated with prostate cancer?", "options": [{"label": "A", "text": "Age over 60 years", "correct": false}, {"label": "B", "text": "Family history of prostate cancer", "correct": false}, {"label": "C", "text": "High intake of red meat", "correct": false}, {"label": "D", "text": "Adequate levels of vitamin D", "correct": true}], "correct_answer": "D. Adequate levels of vitamin D", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Protective factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Risk factors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vitamin D</li>\n<li>Selenium</li>\n<li>Lycopene</li>\n<li>Soy products</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Age >60 years</li>\n<li>High fat diet</li>\n<li>Racial <span class=\"customMeta\" data-dictid=\"ae9e8c2974169277719648432a6efd\">preponderance</span> (Blacks > Whites)</li>\n<li>Intake of red meat</li>\n<li>Family history of <span class=\"customMeta\" data-dictid=\"19c0231fc41692777196ffce23771d\">Prostate</span> CA</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Genetic factors</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>BRCA 2 gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> (Chromosome 13).</li>\n<li>Hypermethylation of <span class=\"customMeta\" data-dictid=\"f945849e691692777188ad7ce5b5e2\">glutathione</span> S-transferase.</li>\n<li>Chromosomal rearrangement juxtaposes TMPRSS-2 with <span class=\"customMeta\" data-dictid=\"255baacbe416927771874a8f2aec0e\">ETS</span> <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old man presents with complaints of increased frequency and urgency of urination, particularly at night. He also mentions a feeling of incomplete bladder emptying and a weak urine stream. The patient's PSA level is within normal limits. The histopathology image is given below. Based on the diagnosis, which of the following is true?", "options": [{"label": "A", "text": "Infiltration of lymphocytes", "correct": false}, {"label": "B", "text": "Presence of atypical cells with high mitotic activity", "correct": false}, {"label": "C", "text": "Increased number of stromal and epithelial cells", "correct": true}, {"label": "D", "text": "Dysplastic changes in the glandular architecture", "correct": false}], "correct_answer": "C. Increased number of stromal and epithelial cells", "question_images": ["https://image.prepladder.com/content/o4ecuJgBJl0zrp4rQaqK1736969289.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which zone of the prostate is primarily affected by benign prostatic hyperplasia (BPH), and which zone is more commonly associated with prostate cancer?", "options": [{"label": "A", "text": "Central zone &amp; Peripheral zone", "correct": false}, {"label": "B", "text": "Peripheral zone &amp; Transitional zone", "correct": false}, {"label": "C", "text": "Transitional zone &amp; Peripheral zone", "correct": true}, {"label": "D", "text": "Peripheral zone &amp; Central zone", "correct": false}], "correct_answer": "C. Transitional zone & Peripheral zone", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/eQ0QqC7H0xIvnDSWwyj41736969171.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Diseases</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Prostate zones</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prostate cancer (adenocarcinoma)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peripheral</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prostatic <span class=\"customMeta\" data-dictid=\"74b2ee426f169277719000793323ba\">intraepithelial</span> neoplasia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peripheral</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prostatitis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Central</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Benign prostatic hyperplasia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Transitional</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following tumour markers (Column A) with the corresponding testicular tumour types (Column B). Column A (Tumor Markers) Column B (Testicular Tumor Types) 1. Alpha-fetoprotein (AFP) A. Seminoma 2. Beta-human chorionic gonadotropin (β-hCG) B. Embryonal Carcinoma 3. CD-30 C. Yolk sac tumour 4. Placental alkaline phosphatase (PLAP) D. Choriocarcinoma 5. Cytokeratin E. Teratoma", "options": [{"label": "A", "text": "1-A, 2-B, 3-C, 4-D, 5-E", "correct": false}, {"label": "B", "text": "1-C, 2-D, 3-A, 4-B, 5-E", "correct": false}, {"label": "C", "text": "1-C, 2-D, 3-B, 4-A, 5-E", "correct": true}, {"label": "D", "text": "1-B, 2-A, 3-D, 4-C, 5-B", "correct": false}], "correct_answer": "C. 1-C, 2-D, 3-B, 4-A, 5-E", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Testicular Tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Corresponding Tumor Markers</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Seminoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Placental <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> <span class=\"customMeta\" data-dictid=\"65f1c4f3d4169277719505249503e0\">phosphatase</span> (PLAP)</li>\n<li>HCG</li>\n<li>LDH</li>\n<li>Newer markers: <span class=\"customMeta\" data-dictid=\"15ed518b6b16927771948a03bd7f72\">Oct</span> 3/4, Nanog, CD117, SALL4</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Embryonal Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>CD-30</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Alpha-fetoprotein (AFP)</li>\n<li>Alpha-1 antitrypsin</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Choriocarcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Beta-human <span class=\"customMeta\" data-dictid=\"6d72527c991692777184af095c6f14\">chorionic gonadotropin</span> (β-hCG)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Teratoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Cytokeratin</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The histological examination of a normal testis is given in the image below. Which of the following callouts is responsible for maintaining the blood testis barrier?", "options": [{"label": "A", "text": "1", "correct": false}, {"label": "B", "text": "2", "correct": true}, {"label": "C", "text": "3", "correct": false}, {"label": "D", "text": "4", "correct": false}], "correct_answer": "B. 2", "question_images": ["https://image.prepladder.com/content/bbhxVF7nMHa4OsXQMXoN1736957829.png"], "explanation_images": ["https://image.prepladder.com/content/tZZeCpLIrvZwxX74Ya8Q1736957988.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-month-old boy was referred to the hospital with non-palpable right testes. The physical examination revealed no jaundice, palpable left testes, or right-sided abdominal mass. Subsequent surgical excision of the mass revealed a cystic mass with keratinous debris, and a biopsy image of the specimen was obtained. All of the following statements regarding this condition are true except?", "options": [{"label": "A", "text": "Typically present as well-defined, encapsulated masses with cystic and solid components.", "correct": false}, {"label": "B", "text": "Often associated with areas of haemorrhage and necrosis.", "correct": false}, {"label": "C", "text": "Histologically, it contains differentiated cells or organoid structures embedded in a fibrous or myxoid stroma.", "correct": false}, {"label": "D", "text": "Demonstrate homogeneous appearance and are mostly found malignant in young children.", "correct": true}], "correct_answer": "D. Demonstrate homogeneous appearance and are mostly found malignant in young children.", "question_images": ["https://image.prepladder.com/content/QNifw5Wn52grMwgiq5Dk1736959391.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old male presents with a rapidly enlarging testicular mass associated with testicular pain and gynecomastia. He reports associated mild hemoptysis for the last 4 days. A biopsy of the mass is performed, and both gross and microscopic images are obtained. What is the most likely diagnosis based on the clinical presentation?", "options": [{"label": "A", "text": "Choriocarcinoma", "correct": true}, {"label": "B", "text": "Embryonal Carcinoma", "correct": false}, {"label": "C", "text": "Seminoma", "correct": false}, {"label": "D", "text": "Yolk Sac Tumor", "correct": false}], "correct_answer": "A. Choriocarcinoma", "question_images": ["https://image.prepladder.com/content/urjTlnRnUlzIQONmXQQn1736959020.png", "https://image.prepladder.com/content/THHxy2Kta91qUCWBxTCx1736959077.png"], "explanation_images": ["https://image.prepladder.com/content/YxfK4DEO90a3gHCRwbPI1736959171.png", "https://image.prepladder.com/content/9azKCWm0kw0850eoZN821736959228.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old male with a painless testicular mass for the past few months. On examination, the right testis was enlarged and the transillumination test was negative. A biopsy of the mass was performed and is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Hydrocoele", "correct": false}, {"label": "B", "text": "Yolk Sac tumour", "correct": true}, {"label": "C", "text": "Choriocarcinoma", "correct": false}, {"label": "D", "text": "Germ Cell tumour", "correct": false}], "correct_answer": "B. Yolk Sac tumour", "question_images": ["https://image.prepladder.com/content/pGiawOQiyHu15guEuczA1736958686.png"], "explanation_images": ["https://image.prepladder.com/content/9VjxouvwVchSAxELPK1u1736958781.png", "https://image.prepladder.com/content/AAIicw1lKWi1Jdh3FfdI1736958887.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents to the hospital with a painless scrotal mass. Ultrasound scan reveals a solid testicular mass suspicious for a spermatocytic tumour. Upon further examination, the following histological findings are identified except?", "options": [{"label": "A", "text": "Associated with gain of function mutation", "correct": false}, {"label": "B", "text": "Presence of inflammatory infiltrates and syncytiotrophoblasts", "correct": true}, {"label": "C", "text": "Presence of three intermixed cell distinct cell populations on microscopy", "correct": false}, {"label": "D", "text": "Low risk of metastasis following surgical resection", "correct": false}], "correct_answer": "B. Presence of inflammatory infiltrates and syncytiotrophoblasts", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Lyw87mfCQuXcyYm9Tiww1736958580.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient underwent unilateral orchiectomy for a swelling in the right testis. The specimen is sent for histopathological examination, and its microscopic appearance is depicted in the image below. Which of the following statements is true regarding the diagnosis?", "options": [{"label": "A", "text": "3 different sizes of tumour cells are seen", "correct": false}, {"label": "B", "text": "Schiller-Duval bodies are present", "correct": false}, {"label": "C", "text": "Tumor cells are arranged in sheets", "correct": false}, {"label": "D", "text": "Tumor cells have a watery-clear cytoplasm", "correct": true}], "correct_answer": "D. Tumor cells have a watery-clear cytoplasm", "question_images": ["https://image.prepladder.com/content/MjQb1EnPCmg6MIvTSbGU1736958369.png"], "explanation_images": ["https://image.prepladder.com/content/UT2yVa0G0eGUQDMMdzHq1736958431.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a germ cell tumour?", "options": [{"label": "A", "text": "Teratoma", "correct": false}, {"label": "B", "text": "Embryonal carcinoma", "correct": false}, {"label": "C", "text": "Spermatocytic seminoma", "correct": false}, {"label": "D", "text": "Sertoli cell tumour", "correct": true}], "correct_answer": "D. Sertoli cell tumour", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Germ cell tumours</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Sex cord-stromal tumours</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Mixed</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Seminomatous:</strong></p>\n<ul>\n<li>Seminoma.</li>\n<li>Spermatocytic seminoma.</li>\n</ul>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Sertoli cell tumour.</li>\n<li>Leydig cell tumour.</li>\n<li>Pure tumours.</li>\n</ul>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gonadoblastoma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-seminomatous:</strong></p>\n<ul>\n<li>Embryonal carcinoma.</li>\n<li>Choriocarcinoma.</li>\n<li>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour.</li>\n<li>Teratoma.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 1-year-old boy is brought to the pediatric clinic by his parents, who are concerned about the absence of his left testicle in the scrotum. On physical examination, the right testicle is palpable in the scrotum, but the left is not. All are true regarding this condition except?", "options": [{"label": "A", "text": "It can occur in association with hypospadias.", "correct": false}, {"label": "B", "text": "The most common site of arrest of descent is the inguinal canal.", "correct": false}, {"label": "C", "text": "It is very commonly associated with a well-defined hormonal disorder.", "correct": true}, {"label": "D", "text": "The Leydig cells appear prominent.", "correct": false}], "correct_answer": "C. It is very commonly associated with a well-defined hormonal disorder.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/EDri3j5wVGEkei7i8U6X1736958161.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 27 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "What is the role of inhibin?", "options": [{"label": "A", "text": "Stimulates the release of FSH", "correct": false}, {"label": "B", "text": "Inhibits the secretion of FSH", "correct": true}, {"label": "C", "text": "Inhibition of PRL", "correct": false}, {"label": "D", "text": "Stimulation of PRL", "correct": false}], "correct_answer": "B. Inhibits the secretion of FSH", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In the cervical smear below, which of the following stains are used", "options": [{"label": "A", "text": "Papanicolaou stain", "correct": true}, {"label": "B", "text": "H &amp; E stain", "correct": false}, {"label": "C", "text": "Giemsa stain", "correct": false}, {"label": "D", "text": "Toluidine blue", "correct": false}], "correct_answer": "A. Papanicolaou stain", "question_images": ["https://image.prepladder.com/notes/Yv3srdKOQyJEYlSMLc4r1746181037.png"], "explanation_images": ["https://image.prepladder.com/notes/Yv3srdKOQyJEYlSMLc4r1746181037.png", "https://image.prepladder.com/notes/Pg3pWm8xW4DjDWdnps2r1746181187.png", "https://image.prepladder.com/notes/6oglkRKAEfuta4fJrp9p1746181293.png", "https://image.prepladder.com/notes/0tDDhU2VsZHdhcO6xUFf1746181405.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following tumour markers are positive for seminoma? PLAP OCT3/4 NANOG HCG", "options": [{"label": "A", "text": "1 only", "correct": false}, {"label": "B", "text": "1 and 2", "correct": false}, {"label": "C", "text": "1, 2 and 3", "correct": false}, {"label": "D", "text": "1, 2, 3 and 4", "correct": true}], "correct_answer": "D. 1, 2, 3 and 4", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:581px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Various testicular tumours and their markers</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none; vertical-align:bottom\">\n<p><strong>Testicular Tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none; vertical-align:bottom\">\n<p><strong>Corresponding Tumor Markers</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Seminoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Placental <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> <span class=\"customMeta\" data-dictid=\"65f1c4f3d4169277719505249503e0\">phosphatase</span> (PLAP)</li>\n<li>HCG</li>\n<li>LDH</li>\n<li>Newer markers: <span class=\"customMeta\" data-dictid=\"15ed518b6b16927771948a03bd7f72\">Oct</span> 3/4, Nanog, CD117, SALL4</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Embryonal Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>CD-30</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Alpha-fetoprotein (AFP)</li>\n<li>Alpha-1 antitrypsin</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Choriocarcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Beta-human <span class=\"customMeta\" data-dictid=\"6d72527c991692777184af095c6f14\">chorionic gonadotropin</span> (β-hCG)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Teratoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Cytokeratin</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions is NOT caused by high-risk strains of human papillomavirus (HPV)?", "options": [{"label": "A", "text": "Cervical cancer", "correct": false}, {"label": "B", "text": "Anal cancer", "correct": false}, {"label": "C", "text": "Oropharyngeal cancer", "correct": false}, {"label": "D", "text": "Laryngeal papillomatosis", "correct": true}], "correct_answer": "D. Laryngeal papillomatosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/pNlhAnfujQ8ASrR3HXZ71745394585.png", "https://image.prepladder.com/notes/abiu5YYqxCNQgcysq88J1745394629.png", "https://image.prepladder.com/notes/R8HtctJ7YpeH2LDBqKji1745394700.png", "https://image.prepladder.com/notes/VI3bczfWbSKmEvTv46BV1745394744.png", "https://image.prepladder.com/notes/uLGMRbfyagdd5RcrsgG61745394786.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:625px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types of HPV</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p><strong>Cutaneous involvement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HPV 1, 2, 3 (low risk)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Filiform wart</li>\n<li>Verruca Plantaris</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HPV 5, 8 (high risk)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Epidermodysplasia Verruciformis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p><strong>Mucosal involvement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HPV 6, 11 (low risk)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Condyloma Acuminatum</li>\n<li><strong>Recurrent laryngeal papillomas</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HPV 16, 18, 31, 33, 35 (high risk)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Squamous cell carcinoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HPV 16 (<strong>High risk)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>LSIL, HSIL, <strong>Carcinoma cervix</strong></li>\n<li>Vulval carcinoma</li>\n<li><strong>Oropharyngeal SCC</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HPV 18 (<strong>High risk)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>LSIL, HSIL, <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> cervix</li>\n<li><strong>Anogenital carcinoma</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cutaneous involvement</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Benign Warts</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<ul>\n<li><strong>Common Skin Warts (Verruca Vulgaris)</strong>: Small, hard, rough growths on the skin; commonly seen in children (associated with serotypes 2, 4, 27, 57).</li>\n<li><strong>Flat Warts (Verruca Plana)</strong>: Also prevalent among children.</li>\n<li><strong>Plantar Warts (Verruca Plantaris)</strong>: <span class=\"customMeta\" data-dictid=\"1bbae82f1f16927771824f797639fa\">Benign</span> lesions commonly found in adolescents (linked to <span class=\"customMeta\" data-dictid=\"65731fcbaf1692777198547abcf08e\">serotype</span> <strong>1</strong>).</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"filiform warts\" data-author=\"Schweintechnik\" data-hash=\"11184\" data-license=\"Open Access\" data-source=\"https://commons.wikimedia.org/wiki/File:Wart_filiform_eyelid.jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/pNlhAnfujQ8ASrR3HXZ71745394585.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<figure class=\"caption_element\"><img alt=\"benign wart\" data-author=\"Węgrowski,\" data-hash=\"11185\" data-license=\"CC BY-SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Warts_at_the_feet.jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/abiu5YYqxCNQgcysq88J1745394629.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Epidermodysplasia Verruciformis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Rare <strong>autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> </strong>conditions may progress to <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span> cell carcinoma, especially in sun-exposed areas.</li>\n<li>Associated with serotypes <strong>5, 8</strong>, 9, 12, 17, 20, 36, and 47.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"Epidermodysplasia Verruciformis\" data-author=\"Monirul Alam\" data-hash=\"11186\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:World%27s_4th_a_Tree_Man.jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/R8HtctJ7YpeH2LDBqKji1745394700.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mucosal involvement</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anogenital Warts</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<ul>\n<li>It is also known as<strong> <span class=\"customMeta\" data-dictid=\"2ed8a5f8f2169277718404b6d69c6c\">Condyloma</span> Acuminatum.</strong></li>\n<li>A <span class=\"customMeta\" data-dictid=\"1e049f568716927771985e276b86f0\">sexually transmitted infection</span> in adults, associated with HPV serotypes <strong>6 and 11.</strong></li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"Anogenital Warts\" data-author=\"Hantoosh, Sundus\" data-hash=\"11187\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/Figure-10-6-Condyloma-acuminatum-venereal-warts-of-vagina-quoted-from_fig25_318702142\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/VI3bczfWbSKmEvTv46BV1745394744.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Head and Neck Lesions</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<ul>\n<li><strong>Benign</strong>: <strong>Recurrent laryngeal papillomas</strong>, especially in children (serotypes<strong> 6, 11</strong>).</li>\n<li><strong>Malignant</strong>: Laryngeal and <span class=\"customMeta\" data-dictid=\"192677035a169277718780b4d6dbbb\">esophageal</span> carcinomas (serotypes<strong> 16, 18</strong>)</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"Recurrent laryngeal papillomas\" data-author=\"Omland, Turid & Lie, Kathrine & Akre, Harriet & Sandlie, Lars & Jebsen, Peter & Sandvik, Leiv & Nymoen, Dag & Bzhalava, Davit & Dillner, Joakim & Brøndbo, Kjell.\" data-hash=\"11189\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Endoscopic-view-of-laryngeal-papilloma-in-a-child-with-RRP_fig1_263057018\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/uLGMRbfyagdd5RcrsgG61745394786.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Carcinoma Cervix</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mainly <strong>squamous cell carcinoma</strong>, <span class=\"customMeta\" data-dictid=\"8d0fca798b1692777191b6cd41880f\">linked</span> to high-risk serotypes like<strong> 16, 18, 31, 33, and others</strong>.</li>\n<li>Serotype 16 alone accounts for ~50% of cases, while serotypes 16 & 18 together cause ~70% of <span class=\"customMeta\" data-dictid=\"25c6ce766c1692777184ab9a40305c\">cervical</span> cancers.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most probable tumour that a 22-year-old woman with a sizable growth in her right ovary, which has been determined to originate from all three germ layers based on histopathology, is experiencing?", "options": [{"label": "A", "text": "Dysgerminoma", "correct": false}, {"label": "B", "text": "Teratoma", "correct": true}, {"label": "C", "text": "Thecoma", "correct": false}, {"label": "D", "text": "Theca lutein cyst", "correct": false}], "correct_answer": "B. Teratoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/WWoY57QW12n1xoqcr9aj1745909144.png", "https://image.prepladder.com/content/c1PU47mRR75zd8z1JgJU1745909144.png", "https://image.prepladder.com/notes/gljYWAkFRPllGTjsGZHu1747999159.png", "https://image.prepladder.com/notes/prAMbCtyx2BWrRBKUdSP1747907942.png", "https://image.prepladder.com/content/oipwzoYlcYBB65H5QL9r1745909144.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis for a 48-year-old patient who came with scrotal swelling, had elevated LDH levels but normal AFP levels on tests for testicular tumours, and exhibited a specific histological picture after orchidectomy?", "options": [{"label": "A", "text": "Yolk sac tumor", "correct": false}, {"label": "B", "text": "Teratoma", "correct": false}, {"label": "C", "text": "Seminoma", "correct": true}, {"label": "D", "text": "Embryonal carcinoma", "correct": false}], "correct_answer": "C. Seminoma", "question_images": ["https://image.prepladder.com/content/VAzXtKYoWwzg1MPUcwIU1745909483.png"], "explanation_images": ["https://image.prepladder.com/notes/aduxHJoE52ZF0aXnz1AO1747908313.png", "https://image.prepladder.com/content/XkxwxnJmWrTMAsZCERYw1745909510.png", "https://image.prepladder.com/content/WZ4wI6B62hoWP4mWXJ8B1745909510.png", "https://image.prepladder.com/notes/SZW5mycV0e7KoSlQ3OdC1747908378.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:696px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Testicular Tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Corresponding Tumor Markers</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Seminoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Placental <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> <span class=\"customMeta\" data-dictid=\"65f1c4f3d4169277719505249503e0\">phosphatase</span> (PLAP)</li>\n<li>HCG</li>\n<li>LDH</li>\n<li>Newer markers: Oct 3/4, Nanog, CD117, SALL4</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Embryonal Carcinoma</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Embryonal_carcinoma#/media/File:Embryonal_carcinoma_-_very_high_mag_-_cropped.jpg\" data-tags=\"\" height=\"272\" src=\"https://image.prepladder.com/content/XkxwxnJmWrTMAsZCERYw1745909510.png\" width=\"404\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>CD-30</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Michal Hošala,L Laca,J Hosalova Matisova,Ján Janík,M Adamik,B Palkoci,Karol Kajo\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Histological-features-of-yolk-sac-tumour-with-pathognomic-Schiller-Duval-Bodies-in_fig2_271390449\" data-tags=\"\" height=\"358\" src=\"https://image.prepladder.com/content/WZ4wI6B62hoWP4mWXJ8B1745909510.png\" width=\"406\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Alpha-fetoprotein (AFP)</li>\n<li>Alpha-1 antitrypsin</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Choriocarcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Beta-human <span class=\"customMeta\" data-dictid=\"6d72527c991692777184af095c6f14\">chorionic gonadotropin</span> (β-hCG)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Teratoma</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Immature teratoma\" data-author=\"Nephron\" data-hash=\"13155\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Immature_teratoma_high_mag.jpg\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/SZW5mycV0e7KoSlQ3OdC1747908378.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Cytokeratin</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a component of Meigs syndrome?", "options": [{"label": "A", "text": "Ascites", "correct": false}, {"label": "B", "text": "Right-sided hydrothorax", "correct": false}, {"label": "C", "text": "Fibromas of ovary", "correct": false}, {"label": "D", "text": "Dysgerminoma of ovary", "correct": true}], "correct_answer": "D. Dysgerminoma of ovary", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/6kS2eviPv2dRGgpGfuOR1747908563.png", "https://image.prepladder.com/notes/rY4Diw0PALX8TfrUSmA31747908618.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is accurate concerning liquid-based cytology?", "options": [{"label": "A", "text": "Urine specimen is used", "correct": true}, {"label": "B", "text": "Sanger sequencing is used", "correct": false}, {"label": "C", "text": "Study of fluid in the tumor microenvironment", "correct": false}, {"label": "D", "text": "DNA is collected in microvessels", "correct": false}], "correct_answer": "A. Urine specimen is used", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a constituent of the Papanicolaou stain?", "options": [{"label": "A", "text": "Light green SF", "correct": false}, {"label": "B", "text": "Orange G", "correct": false}, {"label": "C", "text": "Eosin B", "correct": true}, {"label": "D", "text": "Hematoxylin", "correct": false}], "correct_answer": "C. Eosin B", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/MYtmH2uoHF80tnv8HRJz1746606904.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most common site for an extragonadal germ cell tumor?", "options": [{"label": "A", "text": "Pineal gland", "correct": false}, {"label": "B", "text": "Retroperitoneum", "correct": false}, {"label": "C", "text": "Sacrococcygeal region", "correct": false}, {"label": "D", "text": "Mediastinum", "correct": true}], "correct_answer": "D. Mediastinum", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following sequences correctly represents the progression of hemoglobin handling in the body during intravascular hemolysis (IVH)? A. Hemoglobin binds to albumin, forming meth albuminemia B. Hemoglobin combines with haptoglobin C. Haptoglobin saturation and hemoglobin binding to hemopexin. D. RBC lysis causes hemoglobin to leak out.", "options": [{"label": "A", "text": "D → B → C→ A", "correct": true}, {"label": "B", "text": "D → B → A → C", "correct": false}, {"label": "C", "text": "D → C → A → B", "correct": false}, {"label": "D", "text": "D → C → B → A", "correct": false}], "correct_answer": "A. D → B → C→ A", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/itdspiFXL5IHuh2FAWyM1737694764.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions can cause intravascular hemolysis (IVH)? Select all that apply. a. Paroxysmal Nocturnal Hemoglobinuria (PNH) b. Glucose-6-Phosphate Dehydrogenase (G6PD) deficiency c. Hereditary spherocytosis d. Paroxysmal Cold Hemoglobinuria (PCH) e. Hemolytic Uremic Syndrome (HUS) f. Thrombotic Thrombocytopenic Purpura (TTP)", "options": [{"label": "A", "text": "b, c, d, e and f", "correct": false}, {"label": "B", "text": "a, b, d, e, and f", "correct": true}, {"label": "C", "text": "a, b, c, e, and f", "correct": false}, {"label": "D", "text": "a, b, c, d, and f", "correct": false}], "correct_answer": "B. a, b, d, e, and f", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intravascular hemolysis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extravascular hemolysis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hemolysis occurs inside a vessel</li>\n<li>Hepatomegaly or <span class=\"customMeta\" data-dictid=\"b3eb52fe3b1692777199de8465eea8\">splenomegaly</span> are usually absent</li>\n<li>Serum <span class=\"customMeta\" data-dictid=\"8d8151fa671692777188a59bbec61f\">haptoglobin</span> is reduced</li>\n<li>Hemoglobinuria and <span class=\"customMeta\" data-dictid=\"d255f5eb7916927771885bd197ec11\">hemosiderinuria</span> are seen</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hemolysis occurs outside a vessel.</li>\n<li>Example: Liver, spleen</li>\n<li>Hepatomegaly or <span class=\"customMeta\" data-dictid=\"b3eb52fe3b1692777199de8465eea8\">splenomegaly</span> are usually present</li>\n<li>Serum <span class=\"customMeta\" data-dictid=\"8d8151fa671692777188a59bbec61f\">haptoglobin</span> is usually not decreased</li>\n<li>Hemoglobinuria and <span class=\"customMeta\" data-dictid=\"d255f5eb7916927771885bd197ec11\">hemosiderinuria</span> are absent</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extravascular Hemolysis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intravascular hemolysis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hereditary spherocytosis</li>\n<li>Sickle cell anemia</li>\n<li>Thalassemia</li>\n<li><strong>G6PD deficiency</strong></li>\n<li>Warm <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">anemia</span> (AIHA)</li>\n<li>Cold <span class=\"customMeta\" data-dictid=\"793dda05ac1692777180345347d49c\">agglutinin</span> type AIHA</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Paroxysmal <span class=\"customMeta\" data-dictid=\"d51601f2c41692777193ddfa55d163\">Nocturnal</span> <span class=\"customMeta\" data-dictid=\"ddeb334a351692777188795bb090ef\">Hemoglobinuria</span> (PNH)</li>\n<li>Microangiopathic <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">Hemolytic</span> <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">Anemia</span> (MAHA)- HUS, TTP, DIC</li>\n<li>Paroxysmal cold hemoglobinuria/Cold <span class=\"customMeta\" data-dictid=\"9fea3db5bb16927771885315f60b70\">hemolysin</span> type AIHA</li>\n<li><strong>G6PD deficiency</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following causes of hemolysis with their corresponding categories. Categories Causes of hemolysis a. Intracorpuscular defect b. Extracorpuscular defect 1. Hereditary Spherocytosis (HS) 2. G6PD Deficiency 3. Thrombotic Thrombocytopenic Purpura (TTP) 4. Hemoglobin C Disease 5. Hemolytic Uremic Syndrome (HUS) 6. Sickle Cell Anemia", "options": [{"label": "A", "text": "1-a, 2-b, 3-b, 4-a, 5-a, 6-b", "correct": false}, {"label": "B", "text": "1-b, 2-a, 3-b, 4-a, 5-a, 6-a", "correct": false}, {"label": "C", "text": "1-a, 2-a, 3-b, 4-a, 5-b, 6-a", "correct": true}, {"label": "D", "text": "1-a, 2-b, 3-a, 4-b, 5-a, 6-a", "correct": false}], "correct_answer": "C. 1-a, 2-a, 3-b, 4-a, 5-b, 6-a", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intracorpuscular defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extracorpuscular defect</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Inherited</strong>: membrane, enzymes or <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> defects\n\t\t\t\t<ul>\n<li><strong>Membrane defects:</strong> Hereditary <span class=\"customMeta\" data-dictid=\"d30f4533661692777199385959bd9f\">spherocytosis</span> (HS), Hereditary elliptocytosis</li>\n<li><strong>Enzyme defects:</strong> G6PD deficiency, Pyruvate <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> deficiency, Hexokinase deficiency</li>\n<li><strong>Hemoglobinopathies:</strong> Sickle cell anemias, Thalassemias, HbC disease, and HbD disease.</li>\n</ul>\n</li>\n<li><strong>Acquired</strong>: PNH (Paroxysmal Nocturnal Hemoglobinuria)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>AIHA (Autoimmune <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia)</li>\n<li>MAHA (Microangiopathic <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia)-HUS, TTP, DIC (leads to clotting)</li>\n<li>Malaria (Blackwater fever)</li>\n<li>March Hemoglobinuria (capillaries present in the heels of soldiers break down)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Examine the provided histopathology image of a blood smear containing two types of abnormal red blood cells. Identify the diseases associated with each cell type.", "options": [{"label": "A", "text": "a: Pyruvate kinase deficiency, burns, and uremia; b: Abetalipoproteinemia, liver disease, and vitamin E deficiency.", "correct": true}, {"label": "B", "text": "a: Abetalipoproteinemia, liver disease, and vitamin E deficiency; b: Pyruvate kinase deficiency, burns, and uremia.", "correct": false}, {"label": "C", "text": "a: Abetalipoproteinemia and burns; b: Pyruvate kinase deficiency and uremia.", "correct": false}, {"label": "D", "text": "a: Pyruvate kinase deficiency and liver disease; b: Abetalipoproteinemia and vitamin E deficiency.", "correct": false}], "correct_answer": "A. a: Pyruvate kinase deficiency, burns, and uremia; b: Abetalipoproteinemia, liver disease, and vitamin E deficiency.", "question_images": ["https://image.prepladder.com/content/VmRl77NfWoWZY4IcKblw1736864395.png", "https://image.prepladder.com/content/ym8Mpi3qMeA77HaUWMcd1736864286.png"], "explanation_images": ["https://image.prepladder.com/content/h1q1FKBFQNyFVVFU1sfi1736864602.png", "https://image.prepladder.com/content/R4f9dk2tukkCQk8ju6HZ1736864524.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:667px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Echinocytes </strong></p>\n<p><strong>(aka <span class=\"customMeta\" data-dictid=\"424dfa19a216927771833dc4f65079\">Burr</span> cells)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acanthocytes </strong></p>\n<p><strong>(aka <span class=\"customMeta\" data-dictid=\"77dc1bdd7416927771991cd9877b25\">Spur</span> cells)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Echinocytes are red blood cells with <strong>uniformly spaced</strong>, <strong>short</strong> projections over the cell surface</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acanthocytes are red blood cells with <strong>irregularly spaced</strong>, <strong>spiky</strong> projections of varying lengths</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pyruvate <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> deficiency</li>\n<li>Burns</li>\n<li>Liver disease</li>\n<li>Uremia</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Abetalipoproteinemia</li>\n<li>Liver Disease</li>\n<li>Vitamin E Deficiency</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old male presents with fatigue, jaundice, splenomegaly, and anemia with elevated MCHC. A peripheral smear is done which is shown below. What is the most common protein defect in this condition?", "options": [{"label": "A", "text": "Spectrin", "correct": false}, {"label": "B", "text": "Band 3 protein", "correct": false}, {"label": "C", "text": "Ankyrin", "correct": true}, {"label": "D", "text": "Glycophorin A", "correct": false}], "correct_answer": "C. Ankyrin", "question_images": ["https://image.prepladder.com/content/Ipopnao1KAwiLQrEjdmS1736865013.png"], "explanation_images": ["https://image.prepladder.com/content/cpg4JYKUmBpu3DFt1uCN1736865165.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old child presents with a history of recurrent episodes of jaundice, fatigue, and abdominal pain. Physical examination reveals splenomegaly, and peripheral blood smear shows the following picture. Coomb's test is negative. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Hereditary spherocytosis", "correct": true}, {"label": "B", "text": "Autoimmune hemolytic anemia", "correct": false}, {"label": "C", "text": "Glucose-6-phosphate dehydrogenase (G6PD) deficiency", "correct": false}, {"label": "D", "text": "Thalassemia", "correct": false}], "correct_answer": "A. Hereditary spherocytosis", "question_images": ["https://image.prepladder.com/content/Txy9FEZ3M9BMac5HZVjj1736865291.png"], "explanation_images": ["https://image.prepladder.com/content/cp0aOckl8jUcqHav47aw1737695025.png", "https://image.prepladder.com/content/8jdX3WKKn863ypuvcTdu1736865358.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a typical change in blood indices in patients with hereditary spherocytosis?", "options": [{"label": "A", "text": "MCV decreases", "correct": false}, {"label": "B", "text": "MCHC increases", "correct": false}, {"label": "C", "text": "RDW decreases", "correct": true}, {"label": "D", "text": "Hemoglobin decreases", "correct": false}], "correct_answer": "C. RDW decreases", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-year-old child presents with a history of recurrent episodes of jaundice, fatigue, and abdominal pain. Physical examination reveals splenomegaly. The child's blood work shows the presence of spherocytes on the peripheral blood smear. An osmotic fragility test is performed. Identify the correct statement about this test.", "options": [{"label": "A", "text": "It is a diagnostic test.", "correct": false}, {"label": "B", "text": "In thalassemia patients, low osmotic fragility leads to a right shift on the graph.", "correct": false}, {"label": "C", "text": "In HS patients, high osmotic fragility leads to a right shift on the graph.", "correct": true}, {"label": "D", "text": "Normally, RBC lysis begins at 0.7% NaCl.", "correct": false}], "correct_answer": "C. In HS patients, high osmotic fragility leads to a right shift on the graph.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/1isjv5alXJiTaq27605Y1736863463.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old male presents with severe fatigue, shortness of breath, and dark urine after eating fava beans. He has a history of recurrent hemolytic anemia. On examination, he appears pale and jaundiced. Which statement correctly describes the pathogenesis of his condition?", "options": [{"label": "A", "text": "Deficiency in an enzyme leads to oxidative stress-induced hemolysis.", "correct": true}, {"label": "B", "text": "Excessive production of glutathione leads to the destruction of red blood cells.", "correct": false}, {"label": "C", "text": "Decreased levels of reactive oxygen species (ROS) lead to decreased oxidative damage.", "correct": false}, {"label": "D", "text": "The severity is not influenced by environmental factors or dietary triggers like fava beans.", "correct": false}], "correct_answer": "A. Deficiency in an enzyme leads to oxidative stress-induced hemolysis.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/hTWw0o2plPLpgcdIQP9u1736863806.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents to the emergency department with symptoms of acute hemolytic anemia. A methemoglobin reduction test is performed, revealing a delayed rate of methemoglobin reduction. What is the underlying principle of the above-mentioned screening test used to diagnose G6PD deficiency?", "options": [{"label": "A", "text": "Measures the levels of methemoglobin in red blood cells.", "correct": false}, {"label": "B", "text": "Evaluates the ability of red blood cells to reduce methemoglobin back to haemoglobin.", "correct": true}, {"label": "C", "text": "Detects G6PD activity by measuring the rate of reduction of a fluorescent dye.", "correct": false}, {"label": "D", "text": "Measures the actual activity levels of the G6PD enzyme.", "correct": false}], "correct_answer": "B. Evaluates the ability of red blood cells to reduce methemoglobin back to haemoglobin.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/FnP7XAROT6ccOZhGAyI11736864003.png", "https://image.prepladder.com/content/0nIdGIjn0eyTqHrXUQvK1736865676.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding Paroxysmal Nocturnal Hemoglobinuria (PNH) is true?", "options": [{"label": "A", "text": "Causes extravascular hemolysis", "correct": false}, {"label": "B", "text": "Splenectomy would be beneficial", "correct": false}, {"label": "C", "text": "Causes hemolysis only at night", "correct": false}, {"label": "D", "text": "Acquired intracorpuscular defect", "correct": true}], "correct_answer": "D. Acquired intracorpuscular defect", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following defects is seen in paroxysmal nocturnal hemoglobinuria?", "options": [{"label": "A", "text": "Spectrin", "correct": false}, {"label": "B", "text": "CD 45 and CD 95", "correct": false}, {"label": "C", "text": "G6PD enzyme", "correct": false}, {"label": "D", "text": "PIGA gene", "correct": true}], "correct_answer": "D. PIGA gene", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/z9gnQ3csQnv8ZEfhyVhU1737695129.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most common cause of death in Paroxysmal Nocturnal Hemoglobinuria?", "options": [{"label": "A", "text": "Pancytopenia", "correct": false}, {"label": "B", "text": "Acute Myeloid Leukemia", "correct": false}, {"label": "C", "text": "Hepatic vein thrombosis", "correct": true}, {"label": "D", "text": "Myelodysplastic syndrome", "correct": false}], "correct_answer": "C. Hepatic vein thrombosis", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:564px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Complications of PNH</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> failure</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Pancytopenia<strong> (Option A)</strong></li>\n<li>Aplastic anemia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Thrombosis</strong> (Most common <span class=\"customMeta\" data-dictid=\"254dc5106d1692777183ba9ab1b3e5\">cause of death</span> in PNH)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Cerebral <span class=\"customMeta\" data-dictid=\"75ddd4cc7016927772012e0acd424d\">vein</span> thrombosis</li>\n<li>Hepatic and <span class=\"customMeta\" data-dictid=\"a74252404f1692777196d3f24bde2d\">portal</span> <span class=\"customMeta\" data-dictid=\"75ddd4cc7016927772012e0acd424d\">vein</span> <span class=\"customMeta\" data-dictid=\"3e745919391692777200fae21b7251\">thrombosis</span> - Budd Chiari Syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Clonal expansion</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Acute <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> Leukemia(AML). <strong>(Option B)</strong></li>\n<li>Myelodysplastic syndrome<strong> (Option D)</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following treatments is commonly used for Paroxysmal Nocturnal Hemoglobinuria?", "options": [{"label": "A", "text": "Rituximab", "correct": false}, {"label": "B", "text": "Bevacizumab", "correct": false}, {"label": "C", "text": "Eculizumab", "correct": true}, {"label": "D", "text": "Trastuzumab", "correct": false}], "correct_answer": "C. Eculizumab", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:736px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Monoclonal Antibody</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Disorders</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Mechanism of Action</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Eculizumab</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Paroxysmal <span class=\"customMeta\" data-dictid=\"d51601f2c41692777193ddfa55d163\">Nocturnal</span> <span class=\"customMeta\" data-dictid=\"ddeb334a351692777188795bb090ef\">Hemoglobinuria</span> (PNH)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Inhibits <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> protein C5, preventing <span class=\"customMeta\" data-dictid=\"16b76d1d1c1692777200240efcb0e2\">terminal</span> <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> and reducing hemolysis.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Rituximab (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Non-Hodgkin lymphoma</li>\n<li>Chronic lymphocytic <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">leukemia</span> (CLL)</li>\n<li>Rheumatoid arthritis</li>\n<li>Idiopathic thrombocytopenic <span class=\"customMeta\" data-dictid=\"0acd34c758169277719644923511e5\">purpura</span> (ITP)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Targets CD20 <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> on B cells, leading to B cell <span class=\"customMeta\" data-dictid=\"7061e0e0051692777186ba9c5f27df\">depletion</span> and <span class=\"customMeta\" data-dictid=\"6c0c4e41b31692777192be0fbfce62\">modulation</span> of immune response.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Bevacizumab (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Colorectal cancer</li>\n<li>Lung cancer</li>\n<li>Renal cell carcinoma</li>\n<li>Age-related <span class=\"customMeta\" data-dictid=\"ebad8eb48c1692777191b5de5d04a1\">macular</span> degeneration</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Targets <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> endothelial growth factor (VEGF), inhibiting <span class=\"customMeta\" data-dictid=\"2c25c78eca1692777181c8c8fdae31\">angiogenesis</span> and tumor growth.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Trastuzumab (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Breast cancer</li>\n<li>Gastric cancer</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Targets HER2/neu <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> on cancer cells, inhibiting cell <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and promoting antibody-dependent <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> cytotoxicity.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following histopathological findings with their correct diagnosis: 1. A. Sickle Cell Anemia 2. B. Hereditary Spherocytosis 3. C. G6PD deficiency 4. D. Thalassemia", "options": [{"label": "A", "text": "1-C, 2-D, 3-A, 4-B", "correct": true}, {"label": "B", "text": "1-D, 2-C, 3-B, 4-A", "correct": false}, {"label": "C", "text": "1-B, 2-A, 3-D, 4-C", "correct": false}, {"label": "D", "text": "1-A, 2-B, 3-C, 4-D", "correct": false}], "correct_answer": "A. 1-C, 2-D, 3-A, 4-B", "question_images": ["https://image.prepladder.com/content/7iZ2TdqB63DWN8gLbSad1736872233.png", "https://image.prepladder.com/content/sKMh1Owlt3i1laJlLPUs1736872297.png", "https://image.prepladder.com/content/RDJASHPv96yEqGt27MFJ1736872032.png", "https://image.prepladder.com/content/EBkx3VI6IrGhNxF7HKmg1736872122.png"], "explanation_images": ["https://image.prepladder.com/content/A4lItju6PzBsUMU0MfzP1736872424.png", "https://image.prepladder.com/content/IM7fScVvtFAOUCEaRaou1736872484.png", "https://image.prepladder.com/content/IB6hbmCCuEisFbcq7lha1736872537.png", "https://image.prepladder.com/content/H0SD16ds25bieswr74q01736872596.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:783px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Red Blood Cell Abnormality</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Reason</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>1. Bite cells</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author='\"Joan-Lluis Vives-Corrons Elena Krishnevskaya\"' data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Peripheral-blood-smear-stained-with-MGG-of-a-hemolytic-crisis-due-G6PD-deficiency_fig6_349926118\" data-tags=\"\" height=\"152\" src=\"https://image.prepladder.com/content/A4lItju6PzBsUMU0MfzP1736872424.png\" width=\"200\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>C. <span class=\"customMeta\" data-dictid=\"96985248371692777188cfb38ca861\">G6PD</span> deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Oxidative stress leads to <span class=\"customMeta\" data-dictid=\"4b8ccd7c3516927771851fdaee3f80\">denaturation</span> of <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> → Heinz bodies</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>2. Target cells</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Prof. Osaro Erhabor\" data-hash=\"\" data-license=\"CC BY-SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Thalassemia#/media/File:Delta_Beta_Thalassemia.jpg\" data-tags=\"\" height=\"241\" src=\"https://image.prepladder.com/content/IM7fScVvtFAOUCEaRaou1736872484.png\" width=\"300\"/></p>\n<br/>\n<br/>\n<br/>\n<br/>\n<br/>\n<br/>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>D. Thalassemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>↓ <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">Hemoglobin</span> content in RBCs → ↓ <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> volume → Surface area relatively unchanged → ↑ Surface area to volume ratio→ Altered <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> composition → ↑ Formation of <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> protrusions→ ↑ <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">Membrane</span> <span class=\"customMeta\" data-dictid=\"acb259200b16927771908888d1377c\">instability</span> → ↓ <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">Hemoglobin</span> accumulation in certain <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> areas → Central area with hemoglobin, clear zone, outer ring</p>\n\t\t\t \n\n\t\t\t<p>Uneven distribution of <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> and lipids → Characteristic \"bull's-eye\" appearance of <strong>Target cells</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>3. Sickle-shaped red blood cells</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"S. ArunanS. Hariharan\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.semanticscholar.org/paper/Edge-Detection-of-Sickle-Cells-in-Red-Blood-Cells-Arunan-Hariharan/6809d2a77d118ba6bed38ac74b6ed1b9a975ea16/figure/0\" data-tags=\"\" height=\"199\" src=\"https://image.prepladder.com/content/IB6hbmCCuEisFbcq7lha1736872537.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>A. Sickle Cell Anemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Abnormal <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">Hemoglobin</span> (HbS) →HbS molecules <span class=\"customMeta\" data-dictid=\"8fb5d5a87a1692777196e95cd3c0dc\">polymerize</span> under low oxygen→RBCs become rigid and assume a <strong>sickle shape.</strong></p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>4. Spherocytes</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Hereditary_spherocytosis#/media/File:Hereditary_Spherocytosis_smear_2010-03-17.JPG\" data-tags=\"\" height=\"226\" src=\"https://image.prepladder.com/content/H0SD16ds25bieswr74q01736872596.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>B. <span class=\"customMeta\" data-dictid=\"ee5175c06116927771880846d1cbe0\">Hereditary</span> Spherocytosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Genetic <span class=\"customMeta\" data-dictid=\"359a8718a61692777185568ac80abb\">defect</span> in <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> protein(spectrin) ⟶ Loss of <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> surface area ⟶ RBCs become <strong>spherical</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 25 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 1-year-old boy, previously healthy until five months ago, presents with a three-hour history of severe swelling and tenderness of hands and feet. The family history is significant for an older brother who had transfusion-dependent anaemia and died of pneumococcal sepsis at the age of 6. Which haemoglobin molecule composition protected him from developing symptoms until recently?", "options": [{"label": "A", "text": "α2γ2", "correct": true}, {"label": "B", "text": "α2β2", "correct": false}, {"label": "C", "text": "α2δ2", "correct": false}, {"label": "D", "text": "α2ε2", "correct": false}], "correct_answer": "A. α2γ2", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following points best describes the pathogenesis of sickle cell disease (SCD)? Select all that apply. Nonsense point mutation in 6th position of β-globin chain Mutation promotes the polymerization of oxygenated hemoglobin Glutamic acid is changed to valine at the 6th position of β-globin chain Presence of HbF and HbS is protective against SCD. Patients heterozygous for HbS have more severe diseases than homozygous HbS. Individuals with coexistent α-thalassemia have less severe disease.", "options": [{"label": "A", "text": "1, 5, 4, and 6", "correct": false}, {"label": "B", "text": "3, 4, and 6", "correct": true}, {"label": "C", "text": "2, 5, and 6", "correct": false}, {"label": "D", "text": "1, 2, 5, and 6", "correct": false}], "correct_answer": "B. 3, 4, and 6", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions does not lead to sickling of RBCs in patients with sickle cell disease?", "options": [{"label": "A", "text": "Dehydration", "correct": false}, {"label": "B", "text": "Hypoxia", "correct": false}, {"label": "C", "text": "Increased pH", "correct": true}, {"label": "D", "text": "Decreased HbF", "correct": false}], "correct_answer": "C. Increased pH", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old man who has received blood transfusions on some occasions and has experienced severe pain in his hands and legs came to follow up. He is currently fine with no complaints and has been receiving treatment that has increased his HbF levels for the past 5 years. Which of the following would be seen in the peripheral smear of this patient?", "options": [{"label": "A", "text": "Bite cells", "correct": false}, {"label": "B", "text": "Heinz bodies", "correct": false}, {"label": "C", "text": "Howell-Jolly bodies", "correct": true}, {"label": "D", "text": "Spherocytes", "correct": false}], "correct_answer": "C. Howell-Jolly bodies", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/W1UquwlfYQK1JNLs22UG1736912833.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Encapsulated bacteria</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pneumococcus</li>\n<li>Haemophilus influenzae type b</li>\n<li>Neisseria meningitidis</li>\n<li><em>Bordetella holmesii</em></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bloodborne parasites</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><em>Babesia</em> spp</li>\n<li><em>Plasmodium</em> spp</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the complications of sickle cell disease (SCD) with their corresponding crises: Complications Crises 1. Acute chest syndrome A. Vaso-occlusive crises 2. Parvovirus B19 infection B. Aplastic crises 3. Splenic enlargement C. Sequestration crisis 4. Splenic fibrosis", "options": [{"label": "A", "text": "1-A, 2-B, 3-C, 4-C", "correct": false}, {"label": "B", "text": "1-A, 2-B, 3-C, 4-A", "correct": true}, {"label": "C", "text": "1-A, 2-A, 3-B, 4-C", "correct": false}, {"label": "D", "text": "1-A, 2-C, 3-B, 4-A", "correct": false}], "correct_answer": "B. 1-A, 2-B, 3-C, 4-A", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 12-year-old girl presents to her primary care physician with complaints of fatigue, pallor, and jaundice. Peripheral smear showed sickling of RBCs. What is the most likely electrophoretic pattern seen in this patient?", "options": [{"label": "A", "text": "A", "correct": false}, {"label": "B", "text": "B", "correct": true}, {"label": "C", "text": "C", "correct": false}, {"label": "D", "text": "D", "correct": false}], "correct_answer": "B. B", "question_images": ["https://image.prepladder.com/content/j9ktjjvlML7LKSPDUe1K1736913079.png"], "explanation_images": ["https://image.prepladder.com/notes/qlu3kwKs9JsF0dkb6O881737684712.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding the different types of thalassemia is correct? Thalassemia major - mutations in both alleles of the HBB gene - impaired production of beta-globin chains. Beta-thalassemia trait - mutations in one allele of the HBB gene - reduced beta-globin chain synthesis. Alpha-thalassemia trait - deletions in one or more alpha-globin genes - decreased production of alpha-globin chains. Thalassemia intermedia - mutations affecting both alpha and beta-globin genes - severe anemia requiring regular blood transfusions", "options": [{"label": "A", "text": "1, 2, and 4", "correct": false}, {"label": "B", "text": "2, 3, and 4", "correct": false}, {"label": "C", "text": "1, 3 and 4", "correct": false}, {"label": "D", "text": "1, 2, and 3", "correct": true}], "correct_answer": "D. 1, 2, and 3", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old male presents with fatigue, jaundice, and splenomegaly. Laboratory investigations reveal microcytic hypochromic anemia with increased levels of serum iron and ferritin. Further genetic analysis reveals a mutation in the HBB gene. Upon histopathological examination of the bone marrow, there is evidence of erythroid hyperplasia with ineffective erythropoiesis. Which mutation in the HBB gene is most likely responsible for the patient's presentation?", "options": [{"label": "A", "text": "Substitution of cytosine for guanine at position 8 in the promoter region of the HBB gene.", "correct": false}, {"label": "B", "text": "Substitution of one nucleotide at position +8 in the coding region of the HBB gene.", "correct": false}, {"label": "C", "text": "Splicing mutation resulting in the removal of intervening sequence-IVS1-5 G-&gt; C in the HBB gene.", "correct": true}, {"label": "D", "text": "Insertion of a nucleotide at position 54 in the coding region of the HBB gene", "correct": false}], "correct_answer": "C. Splicing mutation resulting in the removal of intervening sequence-IVS1-5 G-> C in the HBB gene.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>FEATURE </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>THALASSEMIA MAJOR</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>THALASSEMIA INTERMEDIA </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>THALASSEMIA MINOR </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Beta chain production</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No <span class=\"customMeta\" data-dictid=\"806eb8418c16927771822855b56695\">beta</span> chain</p>\n<p>production.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Little chains</p>\n<p>present.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>One <span class=\"customMeta\" data-dictid=\"806eb8418c16927771822855b56695\">beta</span> chain is</p>\n<p>normal.</p>\n<p>Others are</p>\n<p>defective.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinically</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pallor</p>\n<p>Jaundice</p>\n<p>Splenomegaly</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pallor</p>\n<p>Jaundice</p>\n<p>Splenomegaly</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Asymptomatic</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hb (gm/dl)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3 to 5 (more severe)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>5 to 8</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>8</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Iron profile</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old woman with beta-thalassemia major presents to the cardiology clinic with complaints of increasing shortness of breath on exertion and swelling in her ankles. She has been undergoing regular blood transfusions since childhood. She dies after a few days of hospitalization. What is the most common condition leading to her death?", "options": [{"label": "A", "text": "Anemia", "correct": false}, {"label": "B", "text": "Liver disease", "correct": false}, {"label": "C", "text": "Infections", "correct": false}, {"label": "D", "text": "Heart failure", "correct": true}], "correct_answer": "D. Heart failure", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old woman presents to the clinic for routine prenatal care. She has no significant past medical history. Her initial lab work reveals a microcytic, hypochromic anemia. Which of the following statements is most accurate in differentiating between iron deficiency anemia (IDA) and beta-thalassemia minor in this patient?", "options": [{"label": "A", "text": "RDW is typically elevated in IDA compared to beta-thalassemia minor", "correct": true}, {"label": "B", "text": "RDW is typically lower in IDA compared to beta-thalassemia minor", "correct": false}, {"label": "C", "text": "Mentzer index is &gt;13 in beta-thalassemia minor", "correct": false}, {"label": "D", "text": "RDW is typically normal in both IDA and beta-thalassemia minor", "correct": false}], "correct_answer": "A. RDW is typically elevated in IDA compared to beta-thalassemia minor", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Beta <span class=\"customMeta\" data-dictid=\"baed0c93841692777200be26c8b9d2\">Thalassemia</span> Minor</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Type</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microcytic <span class=\"customMeta\" data-dictid=\"07ccd8f461169277718970a6f1a131\">hypochromic</span> anemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microcytic <span class=\"customMeta\" data-dictid=\"07ccd8f461169277718970a6f1a131\">hypochromic</span> anemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>RBC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MCV</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal to low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>RDW(size variance)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #bfbfbf; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mentzer index: MCV/RBC</p>\n</td>\n<td style=\"border-bottom:1px solid #bfbfbf; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>13</p>\n</td>\n<td style=\"border-bottom:1px solid #bfbfbf; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><13</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #757575; border-left:1px solid #bfbfbf; border-right:1px solid #bfbfbf; border-top:1px solid #bfbfbf; vertical-align:top\">\n<p>Reticulocyte count</p>\n</td>\n<td style=\"border-bottom:1px solid #757575; border-left:1px solid #bfbfbf; border-right:1px solid #bfbfbf; border-top:1px solid #bfbfbf; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #757575; border-left:1px solid #bfbfbf; border-right:1px solid #bfbfbf; border-top:1px solid #bfbfbf; vertical-align:top\">\n<p>Normal to slightly increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #757575; vertical-align:top\">\n<p>HbA2 - confirmatory test</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #757575; vertical-align:top\">\n<p><3.5%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #757575; vertical-align:top\">\n<p>>3.5%</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A hematologist is reviewing the peripheral blood smears of three patients diagnosed with different types of thalassemia. Patient A has severe anemia, target cells, and nucleated red blood cells (NRBCs). Patient B has mild anemia with microcytosis and hypochromia but no NRBCs. Patient C has mild anemia with microcytosis and hypochromia but also shows a small number of NRBCs and some hemoglobin H inclusions. Based on the peripheral smear findings, which of the following correctly matches the patients with their thalassemia types?", "options": [{"label": "A", "text": "Patient A: β-thalassemia major, Patient B: β-thalassemia minor, Patient C: α-thalassemia", "correct": true}, {"label": "B", "text": "Patient A: β-thalassemia minor, Patient B: α-thalassemia, Patient C: β-thalassemia major", "correct": false}, {"label": "C", "text": "Patient A: α-thalassemia, Patient B: β-thalassemia minor, Patient C: β-thalassemia major", "correct": false}, {"label": "D", "text": "Patient A: β-thalassemia major, Patient B: α-thalassemia, Patient C: β-thalassemia minor", "correct": false}], "correct_answer": "A. Patient A: β-thalassemia major, Patient B: β-thalassemia minor, Patient C: α-thalassemia", "question_images": ["https://image.prepladder.com/content/uIObeTvQla0k9ql5sKGG1737695529.png", "https://image.prepladder.com/content/OHFoGjoju73sBw0M49r71737695471.png", "https://image.prepladder.com/notes/OelsrNz4Go88dtmFs1Mb1737693579.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/0WupBObMDAm7GcWno9yG1747819073.mp3", "video": ""}, {"text": "Which of the following findings is most consistent with β thalassemia major when compared to β thalassemia minor?", "options": [{"label": "A", "text": "Decrease in HbA, slight increase in HbA2, and normal HbF; HPLC: HbA2: 6%, HbF: 2%", "correct": false}, {"label": "B", "text": "Decrease in HbA, increase in HbA2, and marked increase in HbF; HPLC: HbA2: 6%, HbF: 90%", "correct": true}, {"label": "C", "text": "Absent HbA, slight increase in HbA2, and moderate increase in HbF; HPLC: HbA2: 4%, HbF: 20%", "correct": false}, {"label": "D", "text": "Decrease in HbA, normal HbA2, and normal HbF; HPLC: HbA2: 2%, HbF: 2%", "correct": false}], "correct_answer": "B. Decrease in HbA, increase in HbA2, and marked increase in HbF; HPLC: HbA2: 6%, HbF: 90%", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A pregnant woman is a silent carrier for α-thalassemia (α-/αα) and is concerned about the risk of her child inheriting α-thalassemia. Her partner has the α-thalassemia trait (αα/--). What is the probability that their child will have Hemoglobin H (HbH) disease?", "options": [{"label": "A", "text": "0%", "correct": false}, {"label": "B", "text": "25%", "correct": true}, {"label": "C", "text": "50%", "correct": false}, {"label": "D", "text": "75%", "correct": false}], "correct_answer": "B. 25%", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/6jaA3YmvZWTQdZ0jGk5b1736959299.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Type of <span class=\"customMeta\" data-dictid=\"a9268f2e1d16927771814cfef69cf4\">Alpha</span> Thalassemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Affected <span class=\"customMeta\" data-dictid=\"a9268f2e1d16927771814cfef69cf4\">Alpha</span> Genes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Clinical Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Genotype</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Silent Carrier</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>1 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Typically asymptomatic, mild microcytosis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>-α/αα or αα/-α</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Alpha <span class=\"customMeta\" data-dictid=\"baed0c93841692777200be26c8b9d2\">Thalassemia</span> Trait (Minor)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>2 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mild anemia, microcytosis, hypochromia</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>-α/-α (trans) or --/αα (cis)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hemoglobin H Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>3 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Moderate to severe anemia, hemolysis, splenomegaly, bone changes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>--/-α</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hydrops Fetalis (Hb Bart's)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>4 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Severe anemia, <span class=\"customMeta\" data-dictid=\"7b09c2b34916927771896ff30fcaa0\">hydrops</span> fetalis, usually fatal <span class=\"customMeta\" data-dictid=\"f5942e813b16927771906ad4b3d288\">in utero</span> or shortly after birth</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>--/--</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:372px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>α- (Mother)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>αα (Mother)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>αα (Father)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>α-/αα</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>αα/αα</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>-<strong>- (Father)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>α-/--</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>αα/--</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:629px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Type of <span class=\"customMeta\" data-dictid=\"a9268f2e1d16927771814cfef69cf4\">Alpha</span> Thalassemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Affected <span class=\"customMeta\" data-dictid=\"a9268f2e1d16927771814cfef69cf4\">Alpha</span> Genes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Clinical Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Genotype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Hemoglobin Analysis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Silent Carrier</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>1 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Typically asymptomatic, mild microcytosis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>-α/αα or αα/-α</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Normal or slightly <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> <span class=\"customMeta\" data-dictid=\"62849f5c661692777192fc6b3aeade\">MCV</span> and MCH</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Alpha <span class=\"customMeta\" data-dictid=\"baed0c93841692777200be26c8b9d2\">Thalassemia</span> Trait (Minor)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>2 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mild anemia, microcytosis, hypochromia</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>-α/-α (trans) or --/αα (cis)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Reduced MCV, MCH, normal Hb electrophoresis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hemoglobin H Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>3 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Moderate to severe anemia, hemolysis, splenomegaly, bone changes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>--/-α</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Presence of Hb H (β4), <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> <span class=\"customMeta\" data-dictid=\"62849f5c661692777192fc6b3aeade\">MCV</span> and MCH, Hb <span class=\"customMeta\" data-dictid=\"0284ae84d21692777187eb03c87a57\">electrophoresis</span> shows Hb H</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hydrops Fetalis (Hb Bart's)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>4 out of 4 genes</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Severe anemia, <span class=\"customMeta\" data-dictid=\"7b09c2b34916927771896ff30fcaa0\">hydrops</span> fetalis, usually fatal <span class=\"customMeta\" data-dictid=\"f5942e813b16927771906ad4b3d288\">in utero</span> or shortly after birth</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>--/--</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Presence of Hb Bart's (γ4)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The medical team, aware of the prevalence of genetic disorders in the village decides to implement a screening process using NESTROFT for beta thalassemia. They plan to test the result by observing the solution turning clear by checking the visibility of a black line behind the test and control tubes. Which of the following on Nestrof test would be indicative of a positive result?", "options": [{"label": "A", "text": "Black line visible in both tubes", "correct": false}, {"label": "B", "text": "Black line visible in only control tubes", "correct": false}, {"label": "C", "text": "Black line visible in only test tubes", "correct": true}, {"label": "D", "text": "No black line visible in any of the tubes", "correct": false}], "correct_answer": "C. Black line visible in only test tubes", "question_images": ["https://image.prepladder.com/content/Dit1e1gSZjiowmcu5YMv1739420698.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following diseases with their respective antibodies and target antigens on red blood cells (RBCs): 1. Cold Agglutinin Disease 2. Cold Hemolytic Disease Antibody Target Antigen on RBCs A IgM I antigen B IgG P antigen C IgG I antigen D IgM P antigen Select the correct matching pairs:", "options": [{"label": "A", "text": "1-A, 2-C", "correct": false}, {"label": "B", "text": "1-C, 2-D", "correct": false}, {"label": "C", "text": "1-A, 2-B", "correct": true}, {"label": "D", "text": "1-B, 2-D", "correct": false}], "correct_answer": "C. 1-A, 2-B", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:723px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Cold <span class=\"customMeta\" data-dictid=\"793dda05ac1692777180345347d49c\">Agglutinin</span> Disease (CAD)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Cold <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">Hemolytic</span> Disease (CHD) / <span class=\"customMeta\" data-dictid=\"cd15fe58221692777194fbb9eec8d1\">Paroxysmal</span> Cold Haemoglobinuria(PCH)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Antibody Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>IgM antibodies against the I <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> on RBCs.</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>IgG antibodies against the P <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> on RBCs.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Temperature Sensitivity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Bind avidly at low temperatures (0°C to 4°C), but not at 37°C</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Bind in cool <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> regions, but complement-mediated <span class=\"customMeta\" data-dictid=\"803b5ed1c8169277719190b446ac83\">lysis</span> occurs at warm core</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Causes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Associated with certain infections (Mycoplasma pneumoniae, Epstein-Barr virus, cytomegalovirus, <span class=\"customMeta\" data-dictid=\"c3817918b816927771902d2176d0c8\">influenza</span> virus, HIV), B-cell neoplasms, or idiopathic</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Often seen in children following <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> infections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hemolysis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Intravascular <span class=\"customMeta\" data-dictid=\"c2b082746716927771888f0933941d\">hemolysis</span> is usually not seen; <span class=\"customMeta\" data-dictid=\"26e1dbfb921692777187208a4ff0e9\">extravascular</span> <span class=\"customMeta\" data-dictid=\"c2b082746716927771888f0933941d\">hemolysis</span> due to <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> after release of IgM</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Complement-mediated <span class=\"customMeta\" data-dictid=\"837d6227d81692777190a063ea2cd4\">intravascular</span> <span class=\"customMeta\" data-dictid=\"c2b082746716927771888f0933941d\">hemolysis</span> and hemoglobinuria</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Clinical Symptoms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Pallor, cyanosis, Raynaud phenomenon in cold-exposed body parts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Hemoglobinuria, <span class=\"customMeta\" data-dictid=\"837d6227d81692777190a063ea2cd4\">intravascular</span> hemolysis</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is false regarding warm antibody-mediated autoimmune hemolytic anemia (AIHA)?", "options": [{"label": "A", "text": "It is commonly mediated by IgG antibodies active at 37°C.", "correct": false}, {"label": "B", "text": "It can be associated with the intake of drugs like alpha-methyldopa and quinine.", "correct": false}, {"label": "C", "text": "It typically involves the destruction of red blood cells primarily in the liver.", "correct": true}, {"label": "D", "text": "A positive direct Coombs test is often used to confirm the diagnosis.", "correct": false}], "correct_answer": "C. It typically involves the destruction of red blood cells primarily in the liver.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Antibody Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>IgG</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Optimal Temperature for Activity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>37°C (body temperature)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Common Symptoms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Fatigue, pallor, jaundice, shortness of breath, dark urine, splenomegaly</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Mechanism of Hemolysis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>IgG antibodies bind to RBCs, leading to <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> primarily in the spleen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Positive direct <span class=\"customMeta\" data-dictid=\"39be9b36e21692777185ebcac8d57f\">Coombs test</span> (direct <span class=\"customMeta\" data-dictid=\"18665cc70b1692777181f6f3baa32c\">antiglobulin</span> test)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hemolysis Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Primarily in the spleen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Associated Conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Autoimmune diseases (e.g., lupus), <span class=\"customMeta\" data-dictid=\"42937950901692777191ff3611c9ae\">lymphoproliferative</span> disorders, infections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Drug-Induced Causes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Alpha-methyldopa, quinine, penicillin, and cephalosporins</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Laboratory Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Anemia, elevated <span class=\"customMeta\" data-dictid=\"249592767b16927771976df58de24d\">reticulocyte</span> count, increased LDH, Decreased haptoglobin, spherocytes on blood smear</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 26 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "What is the most common reason for an elevated reticulocyte count among the conditions?", "options": [{"label": "A", "text": "Aplastic anemia", "correct": false}, {"label": "B", "text": "Hemolytic anemia", "correct": true}, {"label": "C", "text": "Megaloblastic anemia", "correct": false}, {"label": "D", "text": "Myelophthisic anemia", "correct": false}], "correct_answer": "B. Hemolytic anemia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/JAW8FW0LyhVnmYuP8gp11736856471.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:470px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reticulocytosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reticulocytopenia </strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hemolytic anemia</li>\n<li>Acute blood loss</li>\n<li>Therapeutic response to nutritional anaemia</li>\n</ul>\n</td>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Aplastic anemia</li>\n<li>Nutritional anaemia</li>\n<li>Iron deficiency</li>\n<li>Vitamin B12 / B6 deficiency</li>\n<li>Myelophthisic anemia</li>\n<li>Myelodysplastic syndromes</li>\n<li>Anaemia of chronic disease</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely interpretation if Hemoglobin is 9 g/dL, MCV is 104 fL, MCH is 22 pg, and MCHC is 31 g/dL?", "options": [{"label": "A", "text": "Microcytic Hypochromic Anaemia", "correct": false}, {"label": "B", "text": "Normocytic Normochromic Anaemia", "correct": false}, {"label": "C", "text": "Macrocytic Hypochromic Anaemia", "correct": true}, {"label": "D", "text": "Microcytic Normochromic Anaemia", "correct": false}], "correct_answer": "C. Macrocytic Hypochromic Anaemia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Parameter</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Values</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Normal Range</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Interpretation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Haemoglobin (Hb)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>9 g/dL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>12-16 g/dL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Mean Corpuscular Volume (MCV)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>104 fL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>80-100 fL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>High (Macrocytic)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Mean Corpuscular <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">Hemoglobin</span> (MCH)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>22 pg</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>27-33 pg</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Low (Hypochromic)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Mean Corpuscular <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">Hemoglobin</span> Concentration (MCHC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>31 g/dL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>32-36 g/dL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Low (Hypochromic)</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microcytic (<80 fL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Normocytic (80-100 fL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macrocytic (>100 fL)</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia</li>\n<li>Thalassemia</li>\n<li>Sideroblastic anaemia</li>\n</ul>\n</td>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anaemia of chronic disease</li>\n<li>Hemolytic anaemia</li>\n<li>Acute blood loss</li>\n<li>Renal disease (↓ Erythropoietin)</li>\n</ul>\n</td>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Liver dysfunction</li>\n<li>Hypothyroidism</li>\n<li>B12 and <span class=\"customMeta\" data-dictid=\"c66705291e1692777203ed3498a606\">folate</span> deficiency</li>\n<li>Cytotoxic drugs</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the Mean Corpuscular Hemoglobin Concentration (MCHC) using Hemoglobin (Hb) level is 15 g/dL and Hematocrit (Hct) is 45%?", "options": [{"label": "A", "text": "33.3 g/dL", "correct": true}, {"label": "B", "text": "34.0 g/dL", "correct": false}, {"label": "C", "text": "32.0 g/dL", "correct": false}, {"label": "D", "text": "30.0 g/dL", "correct": false}], "correct_answer": "A. 33.3 g/dL", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:363px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MCHC (g/dl) = Hb x 100/ <span class=\"customMeta\" data-dictid=\"fc17bf3e0b169277719482b6add142\">PCV</span> or Hematocrit</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male patient presents for a routine check-up. His laboratory results show that his Hemoglobin (Hb) level is 14 g/dL, and his RBC count is 4.7 million cells/μL. Using these values, calculate the Mean Corpuscular Hemoglobin (MCH).", "options": [{"label": "A", "text": "29.8 pg", "correct": true}, {"label": "B", "text": "29.0 pg", "correct": false}, {"label": "C", "text": "30.0 pg", "correct": false}, {"label": "D", "text": "28.5 pg", "correct": false}], "correct_answer": "A. 29.8 pg", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:334px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MCH (pg) = Hb x 10/ <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> count</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Calculate MCV in a patient where RBC count is 4.5 million cells per microliter (cells/μL), Hb 9gm/dl and Hematocrit is 30%", "options": [{"label": "A", "text": "65.7 fL", "correct": false}, {"label": "B", "text": "66.7 fL", "correct": true}, {"label": "C", "text": "67.7 fL", "correct": false}, {"label": "D", "text": "68.7 fL", "correct": false}], "correct_answer": "B. 66.7 fL", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:334px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MCV (fL) = <span class=\"customMeta\" data-dictid=\"fc17bf3e0b169277719482b6add142\">PCV</span> x 10/ <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> count</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "RBC indices Definitions 1. MCV a) Indicates the variation in the size of red blood cells. 2. MCH b) Reflects the average volume of a red blood cell. 3. MCHC c) Measures the average amount of haemoglobin in a single red blood cell. 4. RDW d) Represents the amount of haemoglobin per unit volume of red blood cells.", "options": [{"label": "A", "text": "1-b, 2-c, 3-d, 4-a", "correct": true}, {"label": "B", "text": "1-c, 2-a, 3-b, 4-d", "correct": false}, {"label": "C", "text": "1-d, 2-a, 3-c, 4-b", "correct": false}, {"label": "D", "text": "1-b, 2-d, 3-c, 4-a", "correct": false}], "correct_answer": "A. 1-b, 2-c, 3-d, 4-a", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:717px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>RBC INDICES</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>DEFINITION </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>INTERPRETATION</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MCV (Mean Corpuscular Volume)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reflects the average volume of a <span class=\"customMeta\" data-dictid=\"248111ded81692777197946454db52\">red blood cell</span> and is expressed as femtoliters (fl) or cubic microns (μm³).</p>\n<p>MCV= PCV/RBC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><80fl= Microcytic</li>\n<li>80-100 fl= Normocytic</li>\n<li>>80= Macrocytic</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MCH (Mean Corpuscular Hemoglobin)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Measures the average amount of haemoglobin in a single red blood cell, expressed in picograms (pg).</p>\n<p>MCH= Hb/ RBC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><27 pg = Hypochromic</li>\n<li>27-32 pg = Normochromic</li>\n<li>>32 pg = Hyperchromic</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MCHC (Mean Corpuscular <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">Hemoglobin</span> Concentration)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Represents the average concentration of haemoglobin in a given volume of red blood cells, expressed as grams per <span class=\"customMeta\" data-dictid=\"24a440df3e16927771854437031340\">deciliter</span> (g/dl).</p>\n<p>MCHC= MCH/MCV</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal value: 33-37g/dl</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>RDW (Red Cell Distribution Width)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Indicates the variation in the size of red blood cells<strong> (Anisocytosis)</strong>, expressed as a percentage.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal Value: 11.5-14.5%</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/du6zQguCNjALxBzuLE891747308525.mp3", "video": ""}, {"text": "A 5-year-old child presented with a fever and his blood sample was taken to measure ESR using the Wintrobe tube. What are the advantages of the instrument (A) over instrument (B)?", "options": [{"label": "A", "text": "The test is more sensitive", "correct": false}, {"label": "B", "text": "Does not need anticoagulant", "correct": false}, {"label": "C", "text": "Useful for estimation of both PCV and ESR", "correct": true}, {"label": "D", "text": "More volume of the tube", "correct": false}], "correct_answer": "C. Useful for estimation of both PCV and ESR", "question_images": ["https://image.prepladder.com/content/ZUhDnZOc2My6VZWfV4J41736856830.png", "https://image.prepladder.com/content/wLI1IfulrhHaeLXwGbuI1736856873.png"], "explanation_images": ["https://image.prepladder.com/content/eLNh14CKmhyd4p98TPX61736856939.png", "https://image.prepladder.com/content/zPrFYrsfEft8zveL162U1736856916.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:572px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Wintrobe (A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Westergren (B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Structure </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tube - closed at one end</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pipette - open at both ends</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Length</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>11cm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>30cm</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diameter </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2.5mm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2.5mm</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Volume</strong> <strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less volume</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More volume</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anticoagulant</strong> <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>EDTA</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sodium citrate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Uses</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PCV, <span class=\"customMeta\" data-dictid=\"49069760291692777187e0e72db819\">ESR</span> estimation, <span class=\"customMeta\" data-dictid=\"353a9bd0c61692777183ec2414d977\">buffy</span> coat <span class=\"customMeta\" data-dictid=\"6777533153169277719804fcbbf2d1\">smear</span> preparation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ESR estimation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sensitivity <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Image</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"300\" src=\"https://image.prepladder.com/content/eLNh14CKmhyd4p98TPX61736856939.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"300\" src=\"https://image.prepladder.com/content/zPrFYrsfEft8zveL162U1736856916.png\" width=\"300\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which statement accurately describes ESR (Erythrocyte Sedimentation Rate)?", "options": [{"label": "A", "text": "Non-specific marker of inflammation", "correct": true}, {"label": "B", "text": "Proportion of red blood cells in the total blood volume", "correct": false}, {"label": "C", "text": "Reflects the oxygen-carrying capacity of the blood", "correct": false}, {"label": "D", "text": "Reported in percentage", "correct": false}], "correct_answer": "A. Non-specific marker of inflammation", "question_images": [], "explanation_images": [], "explanation": "<p><strong>References:</strong></p>\n<ul><li>↳ ESR (Erythrocyte Sedimentation Rate) PCV (Packed Cell Volume)</li><li>↳ ESR (Erythrocyte Sedimentation Rate)</li><li>↳ ESR (Erythrocyte Sedimentation Rate)</li><li>↳ ESR (Erythrocyte Sedimentation Rate)</li><li>↳ PCV (Packed Cell Volume)</li><li>↳ PCV (Packed Cell Volume)</li><li>↳ PCV (Packed Cell Volume)</li><li>↳ Definition It measures the rate at which red blood cells (erythrocytes) settle at the bottom of a test tube over a specified period, usually one hour. PCV, also known as hematocrit, measures the proportion of blood volume occupied by red blood cells. (Option B)</li><li>↳ Definition</li><li>↳ Definition</li><li>↳ Definition</li><li>↳ It measures the rate at which red blood cells (erythrocytes) settle at the bottom of a test tube over a specified period, usually one hour.</li><li>↳ It measures the rate at which red blood cells (erythrocytes) settle at the bottom of a test tube over a specified period, usually one hour.</li><li>↳ PCV, also known as hematocrit, measures the proportion of blood volume occupied by red blood cells. (Option B)</li><li>↳ PCV, also known as hematocrit, measures the proportion of blood volume occupied by red blood cells. (Option B)</li><li>↳ (Option B)</li><li>↳ Significance Non-specific marker of inflammation No specific role in inflammation.</li><li>↳ Significance</li><li>↳ Significance</li><li>↳ Significance</li><li>↳ Non-specific marker of inflammation</li><li>↳ Non-specific marker of inflammation</li><li>↳ No specific role in inflammation.</li><li>↳ No specific role in inflammation.</li><li>↳ Increases in Inflammation, fever, pregnancy, cancer Polycythemia</li><li>↳ Increases in</li><li>↳ Increases in</li><li>↳ Increases in</li><li>↳ Inflammation, fever, pregnancy, cancer</li><li>↳ Inflammation, fever, pregnancy, cancer</li><li>↳ Polycythemia</li><li>↳ Polycythemia</li><li>↳ Decreases in Sickle cell disease, polycythemia, hypoproteinemia Anemia</li><li>↳ Decreases in</li><li>↳ Decreases in</li><li>↳ Decreases in</li><li>↳ Sickle cell disease, polycythemia, hypoproteinemia</li><li>↳ Sickle cell disease, polycythemia, hypoproteinemia</li><li>↳ Anemia</li><li>↳ Anemia</li><li>↳ Reported in Millimeter percentage % (Option D)</li><li>↳ Reported in</li><li>↳ Reported in</li><li>↳ Reported in</li><li>↳ Millimeter</li><li>↳ Millimeter</li><li>↳ percentage % (Option D)</li><li>↳ percentage % (Option D)</li><li>↳ (Option D)</li><li>↳ Reference range Male ≤15 mm/hr Female ≤ 20 mm/hr Child ≤10 mm/h Male = 40% to 54% Female = 36% to 48%.</li><li>↳ Reference range</li><li>↳ Reference range</li><li>↳ Reference range</li><li>↳ Male ≤15 mm/hr Female ≤ 20 mm/hr Child ≤10 mm/h</li><li>↳ Male ≤15 mm/hr</li><li>↳ Female ≤ 20 mm/hr</li><li>↳ Child ≤10 mm/h</li><li>↳ Male = 40% to 54% Female = 36% to 48%.</li><li>↳ Male = 40% to 54%</li><li>↳ Female = 36% to 48%.</li></ul>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:564px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ESR (Erythrocyte <span class=\"customMeta\" data-dictid=\"d53a6ee0c81692777198aeb94eb4ca\">Sedimentation</span> Rate)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PCV (Packed Cell Volume)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It measures the rate at which red blood cells (erythrocytes) settle at the bottom of a test tube over a specified period, usually one hour.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PCV, also known as hematocrit, measures the proportion of <span class=\"customMeta\" data-dictid=\"b9b690b70c16927771833aae799b33\">blood volume</span> occupied by red blood cells. <strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Significance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-specific marker of inflammation </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No specific role in inflammation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Increases in </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Inflammation, fever, pregnancy, cancer</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Polycythemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Decreases in </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sickle cell disease, polycythemia, hypoproteinemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reported in</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Millimeter</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>percentage %<strong> (Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reference range</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Male ≤15 mm/hr</p>\n<p>Female ≤ 20 mm/hr</p>\n<p>Child ≤10 mm/h</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Male = 40% to 54%</p>\n<p>Female = 36% to 48%.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 48-year-old man presents to the clinic with fatigue, palpitations, and shortness of breath. Examination reveals pallor. Using the following values, calculate the reticulocyte production index: Reticulocyte count: 5% Hemoglobin: 9 g/dL Hematocrit: 28%", "options": [{"label": "A", "text": "1.8", "correct": false}, {"label": "B", "text": "1.5", "correct": true}, {"label": "C", "text": "2.5", "correct": false}, {"label": "D", "text": "2.0", "correct": false}], "correct_answer": "B. 1.5", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:524px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>RPI = CRC / <span class=\"customMeta\" data-dictid=\"76948f718016927771924774ade7e9\">maturation</span> time in <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood in days</strong></p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:457px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hematocrit</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Maturation time</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>≥ 40%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1 Day</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>30-40%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1.5 Days</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>20-30%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2 Days</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>< 20%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2.5 Days</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old man presents to the OPD with fatigue, weakness, and breathlessness. He shows pallor and icterus on examination. Given his hemogram results, reticulocyte count of 5%, haemoglobin of 9 g/dL, and hematocrit of 28%, calculate his corrected reticulocyte count.", "options": [{"label": "A", "text": "4.0", "correct": false}, {"label": "B", "text": "5.1", "correct": false}, {"label": "C", "text": "4.5", "correct": false}, {"label": "D", "text": "3.0", "correct": true}], "correct_answer": "D. 3.0", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:671px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CRC= Observed <span class=\"customMeta\" data-dictid=\"249592767b16927771976df58de24d\">reticulocyte</span> count x Patient’s haemoglobin / Standard haemoglobin</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "At which site does erythropoiesis primarily occur in an adult human?", "options": [{"label": "A", "text": "Bone marrow of long bones", "correct": true}, {"label": "B", "text": "Bone marrow of all bones", "correct": false}, {"label": "C", "text": "Yolk sac", "correct": false}, {"label": "D", "text": "Liver", "correct": false}], "correct_answer": "A. Bone marrow of long bones", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the approximate maturation time for reticulocytes in the bone marrow before they are released into the bloodstream as mature red blood cells?", "options": [{"label": "A", "text": "1-2 days", "correct": true}, {"label": "B", "text": "2-5 days", "correct": false}, {"label": "C", "text": "6-7 days", "correct": false}, {"label": "D", "text": "8-10 days", "correct": false}], "correct_answer": "A. 1-2 days", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the normal range for reticulocyte count in adults?", "options": [{"label": "A", "text": "0.5-2%", "correct": true}, {"label": "B", "text": "2-6%", "correct": false}, {"label": "C", "text": "2-3%", "correct": false}, {"label": "D", "text": "0-0.1%", "correct": false}], "correct_answer": "A. 0.5-2%", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/x5o1kMJZJoH2d4XP8rjo1736856364.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old woman experiences ongoing fatigue and weakness, appearing pale upon examination. Laboratory investigations reveal low haemoglobin levels, and a peripheral blood smear is ordered. Which stain is most effective for visualising reticulocytes in peripheral blood smears?", "options": [{"label": "A", "text": "Prussian Blue", "correct": false}, {"label": "B", "text": "New Methylene Blue", "correct": true}, {"label": "C", "text": "Periodic acid-Schiff (PAS) stain", "correct": false}, {"label": "D", "text": "Wright stain", "correct": false}], "correct_answer": "B. New Methylene Blue", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/68PLhAqKfTJnYhIBUPgI1736855995.png", "https://image.prepladder.com/content/MchHltFj7xw5ccdCfY7d1736856039.png", "https://image.prepladder.com/content/0I5dRl4RrJ8RtZFKU2W81736856148.png", "https://image.prepladder.com/content/LlyqXUAzzGiS0QCT2Ooi1736856209.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which stage of erythropoiesis is characterised by the expulsion of the nucleus, resulting in a smaller, pyknotic cell with increased haemoglobin content?", "options": [{"label": "A", "text": "Reticulocyte", "correct": true}, {"label": "B", "text": "Normoblast", "correct": false}, {"label": "C", "text": "Basophilic erythroblast", "correct": false}, {"label": "D", "text": "Proerythroblast", "correct": false}], "correct_answer": "A. Reticulocyte", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/bUIHcyo5D9TfX3Q2YLI31736853902.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which condition is NOT typically associated with a dry tap during bone marrow aspiration?", "options": [{"label": "A", "text": "Aplastic anaemia", "correct": false}, {"label": "B", "text": "Hairy cell leukemia", "correct": false}, {"label": "C", "text": "Myelofibrosis", "correct": false}, {"label": "D", "text": "Chronic Myeloid Leukemia", "correct": true}], "correct_answer": "D. Chronic Myeloid Leukemia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/0TaGBy6uEmiU4Ro0UhFm1736853743.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "If a person is 45 years old, what would be the expected percentage of cellularity in their bone marrow biopsy?", "options": [{"label": "A", "text": "45%", "correct": false}, {"label": "B", "text": "55%", "correct": true}, {"label": "C", "text": "65%", "correct": false}, {"label": "D", "text": "75%", "correct": false}], "correct_answer": "B. 55%", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:334px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>% <span class=\"customMeta\" data-dictid=\"aed7aaaa4516927771844cded86cdb\">Cellularity</span> =100 − age of the patient</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old man presents with fatigue and bone pain and undergoes a bone marrow biopsy, which shows a composition of cells and fat, as shown in the image below. What is the ratio of hematopoietic cells to fat cells in this patient?", "options": [{"label": "A", "text": "1:1", "correct": true}, {"label": "B", "text": "1:3", "correct": false}, {"label": "C", "text": "2:3", "correct": false}, {"label": "D", "text": "3:1", "correct": false}], "correct_answer": "A. 1:1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/PbsDLImuExVSPSll0BoX1736853531.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 56-year-old male presents with pancytopenia and is scheduled for a bone marrow biopsy to determine the underlying cause. What is the most common site for performing a bone marrow biopsy in this patient?", "options": [{"label": "A", "text": "Anterior Superior Iliac spine", "correct": false}, {"label": "B", "text": "Posterior Superior Iliac spine", "correct": true}, {"label": "C", "text": "Proximal femur", "correct": false}, {"label": "D", "text": "Proximal tibia", "correct": false}], "correct_answer": "B. Posterior Superior Iliac spine", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the instrument shown in the image below.", "options": [{"label": "A", "text": "Salah needle", "correct": false}, {"label": "B", "text": "Klima needle", "correct": false}, {"label": "C", "text": "Jamshidi needle", "correct": true}, {"label": "D", "text": "Quincke needle", "correct": false}], "correct_answer": "C. Jamshidi needle", "question_images": ["https://image.prepladder.com/content/hqlPCZebVBvGazR1N0fw1736834579.png"], "explanation_images": ["https://image.prepladder.com/content/l4cqDn1WNUaWSFLG1DLS1736834620.png", "https://image.prepladder.com/content/kk2m7DaEljNs0kiySPd41736834719.png", "https://image.prepladder.com/content/Z4g0HPyD7N0Lh4BpelFH1736834697.png", "https://image.prepladder.com/content/aEq2TrMrwBSCDNS23Dd61736834740.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 30 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following statements is correct regarding the normal metabolism of vitamin B12? A. Haptocorrin from salivary glands binds to B12 in the stomach. B. It is absorbed in the duodenum with the help of intrinsic factor and transcobalamin II. C. Gastric enzymes play an important role in splitting of haptocorrin-B12 complex. D. It is stored primarily in the liver and has a large reserve capacity. E. It acts as a cofactor for converting homocysteine to methionine and methylmalonyl-CoA to succinyl-CoA.", "options": [{"label": "A", "text": "A, B, C, and D", "correct": false}, {"label": "B", "text": "A, D, and E", "correct": true}, {"label": "C", "text": "A and C", "correct": false}, {"label": "D", "text": "C and D", "correct": false}], "correct_answer": "B. A, D, and E", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/PIaCUyCtsAm7MZoAkyBG1736997127.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are the causes of anaemia due to vitamin B12 deficiency, except?", "options": [{"label": "A", "text": "Pernicious anemia", "correct": false}, {"label": "B", "text": "Chronic alcoholism", "correct": true}, {"label": "C", "text": "Diphyllobothrium latum infection", "correct": false}, {"label": "D", "text": "Gastric resection", "correct": false}], "correct_answer": "B. Chronic alcoholism", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reduced Dietary Intake</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Increased demand</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Impaired Absorption</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vegetarian diet</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pregnancy</li>\n<li>Lactation</li>\n<li>Growing child</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pernicious <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">anemia</span> (Option A)</li>\n<li>Infections- <span class=\"customMeta\" data-dictid=\"8559a65a1116927771864c296ce496\">Diphyllobothrium</span> latum (Option C)</li>\n<li>Gastrectomy (Option:D)</li>\n<li>Ileal disorders</li>\n<li>Malabsorption</li>\n<li>Ileal resection</li>\n<li>Diverticula of bowel</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old female presents with chronic fatigue, shortness of breath, tingling and numbness in her hands and feet, bloating, and epigastric pain after meals. She has a history of occasional heartburn and nausea. On examination, she is pale, has a smooth, enlarged tongue with the following findings on the hand. Lab investigations show haemoglobin to be 9.6 g% and MCV 112. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Iron deficiency anaemia", "correct": false}, {"label": "B", "text": "Folate deficiency", "correct": false}, {"label": "C", "text": "Pernicious anaemia", "correct": true}, {"label": "D", "text": "Thalassemia", "correct": false}], "correct_answer": "C. Pernicious anaemia", "question_images": ["https://image.prepladder.com/content/1rjj9Qsgw7FWxp1Ol9Gq1736997252.png"], "explanation_images": ["https://image.prepladder.com/content/EEN1ih0AaZ0DE8fDEwzH1737695684.png", "https://image.prepladder.com/content/IfiXmlzyLHMPzggIy7ez1736997388.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following laboratory findings with the most likely diagnosis. a. Microcytic anaemia, normal homocysteine and methylmalonic acid levels. 1. Vitamin B12 Deficiency b. Macrocytic anaemia, elevated homocysteine and methylmalonic acid levels. 2. Iron Deficiency Anemia (IDA) c. Macrocytic anaemia, elevated homocysteine and normal methylmalonic acid levels. 3. Anaemia of Chronic Disease (ACD) d. Normocytic anaemia, normal homocysteine and methylmalonic acid levels. 4. Folate Deficiency", "options": [{"label": "A", "text": "a-2, b-1, c-4, d-3", "correct": true}, {"label": "B", "text": "a-1, b-2, c-4, d-3", "correct": false}, {"label": "C", "text": "a-2, b-1, c-3, d-4", "correct": false}, {"label": "D", "text": "a-3, b-4, c-1, d-2", "correct": false}], "correct_answer": "A. a-2, b-1, c-4, d-3", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/mrIt7rwD0o1FtHENQx171737695780.png", "https://image.prepladder.com/content/HGQOCdZLCHmlwV8pCJXF1736997478.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:610px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lab Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Blood Smear</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vitamin B12 Deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>RBC Indices:</p>\n<ul>\n<li>Hemoglobin(Hb): low.</li>\n<li><strong>MCV: high (> 100fL).</strong></li>\n<li><strong>MCH: high.</strong></li>\n<li>MCHC: normal.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p>Homocysteine:<strong> Low</strong></p>\n<p>Methylmalonic acid:<strong> Low.</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macrocytic hyperchromic</strong> anemia.</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Keith Chambers\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Normal_Adult_Blood_Smear.JPG\" data-tags=\"\" height=\"257\" src=\"https://image.prepladder.com/content/mrIt7rwD0o1FtHENQx171737695780.png\" width=\"300\"/></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"B N Gayathri,Kadam Satyanarayan Rao\" data-hash=\"\" data-license=\"CC BY-NC-ND 4.0\" data-source=\"https://www.researchgate.net/figure/Peripheral-smear-showing-macrocytic-anemia-with-hypersegmented-neutrophils-Leishman_fig1_51246412\" data-tags=\"\" height=\"233\" src=\"https://image.prepladder.com/content/HGQOCdZLCHmlwV8pCJXF1736997478.png\" width=\"300\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Folate Deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>RBC Indices:</p>\n<ul>\n<li>Hemoglobin(Hb): low.</li>\n<li>MCV: high (> 100fL).</li>\n<li>MCH: high.</li>\n<li>MCHC: normal.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p>Homocysteine:<strong> Low</strong></p>\n<p>Methylmalonic acid:<strong> Normal.</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a finding on a peripheral blood smear in vitamin B12 deficiency?", "options": [{"label": "A", "text": "No options available", "correct": false}], "correct_answer": "Unknown", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tNeV2TwBvD3UlFDPrB1p1736997578.png", "https://image.prepladder.com/content/RuyfYpycqOizCMfb2KdM1736997977.png", "https://image.prepladder.com/content/pGJ0oHcecKycnjhJYt8E1736997748.png", "https://image.prepladder.com/content/ytsNMsiEFNwjxUWVnj001736997822.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:637px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Blood Smear</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated Disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Osaretin\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Macrocytosis.jpg\" data-tags=\"\" height=\"241\" src=\"https://image.prepladder.com/content/RuyfYpycqOizCMfb2KdM1736997977.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macrocytosis (Option A)</strong></p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Enlarged oddly shaped RBC</li>\n<li>MCV > 100fL</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Alcoholism</li>\n<li>Megaloblastic anaemia</li>\n<li>Pregnancy</li>\n<li>Aplastic anemia</li>\n<li>Hypothyroidism.</li>\n</ol>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"J3D3 \" data-hash=\"\" data-license=\"CC BY-SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Cabot_rings#/media/File:CabotMejo.jpg\" data-tags=\"\" height=\"381\" src=\"https://image.prepladder.com/content/pGJ0oHcecKycnjhJYt8E1736997748.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cabot ring (Option B)</strong></p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Arginine-rich mitotic spindle</li>\n<li>Figure of 8\" shaped inclusions</li>\n<li>Basophilic <span class=\"customMeta\" data-dictid=\"37d5ea489a1692777199ec08c05fe6\">stippling</span> in the erythrocyte.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Thalassaemia</li>\n<li>Megaloblastic anaemia</li>\n<li>Lead poisoning</li>\n</ol>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao and Mikael Häggström\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Howell%E2%80%93Jolly_body#/media/File:Howell-Jolly_body.png\" data-tags=\"\" height=\"402\" src=\"https://image.prepladder.com/content/ytsNMsiEFNwjxUWVnj001736997822.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Howell-Jolly body<br/>\n\t\t\t(Option C)</strong></p>\n\t\t\t \n\n\t\t\t<ul>\n<li>DNA or nuclear remnants in the erythrocyte.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Megaloblastic anaemia</li>\n<li>Post-splenectomy</li>\n<li>Hemolytic anaemia</li>\n</ol>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All the following findings are seen in vitamin B12 deficiency except?", "options": [{"label": "A", "text": "Myeloid/erythroid ratio is 3:1", "correct": true}, {"label": "B", "text": "Sieve-like chromatin on bone marrow smear", "correct": false}, {"label": "C", "text": "Increased LDH levels", "correct": false}, {"label": "D", "text": "Increased bilirubin levels", "correct": false}], "correct_answer": "A. Myeloid/erythroid ratio is 3:1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:646px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Biochemical Tests</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"8\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hypercellular bone marrow</li>\n<li>Erythroid Hyperplasia</li>\n<li>Sieve-like <span class=\"customMeta\" data-dictid=\"77399c6ee0169277718492fb8fd58f\">chromatin</span> <strong>(Option: B)</strong>.</li>\n<li>Hypersegmented neutrophils</li>\n<li><strong>Reversal of myeloid: <span class=\"customMeta\" data-dictid=\"892718f3e916927771871389d2e1a3\">erythroid</span> ratio 1:1 or less (Normal: 3:1) (Option A)</strong></li>\n<li>Nuclear-cytoplasmic asynchrony</li>\n</ul>\n</td>\n<td rowspan=\"8\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Serum bilirubin: Increases<strong> (Option: D)</strong>.</li>\n<li>Serum LDH: Increases<strong> (Option: C)</strong>.</li>\n<li>Vitamin B12: Decreases</li>\n<li>Folic acid: Decreases</li>\n<li>Anti-Intrinsic Factor (IF) antibody: Present (Pernicious anemia)</li>\n<li>Methylmalonyl CoA: Increases</li>\n<li>Homocysteine: Increases</li>\n<li>Schilling Test: Assess cause of B12 deficiency.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with tiredness and myalgia for the past 3 months. She has hypertension, psoriasis and hyperuricemia, for which she is on multiple medications. A peripheral blood smear is done which is given in the image below. Which of her following medications would have caused these symptoms?", "options": [{"label": "A", "text": "Hydrochlorothiazide", "correct": false}, {"label": "B", "text": "Adalimumab", "correct": false}, {"label": "C", "text": "Methotrexate", "correct": true}, {"label": "D", "text": "Colchicine", "correct": false}], "correct_answer": "C. Methotrexate", "question_images": ["https://image.prepladder.com/content/mCGmQSjZZQ6YAOS12HOs1736998372.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Decreased intake</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Inadequate diet.</li>\n<li>Alcoholism.</li>\n<li>Infancy.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Impaired absorption</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Malabsorption states.</li>\n<li>Intrinsic intestinal disease.</li>\n<li>Anticonvulsants, oral contraceptives.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased loss</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Haemodialysis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased requirement</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pregnancy.</li>\n<li>Infancy.</li>\n<li>Disseminated cancer.</li>\n<li>Markedly increased hematopoiesis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Impaired utilisation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Folic acid antagonists (Methotrexate).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following helps differentiate megaloblastic anaemia caused by vitamin B12 deficiency, not folate?", "options": [{"label": "A", "text": "Reduced plasma homocysteine levels", "correct": false}, {"label": "B", "text": "Neurological symptoms improve after folate administration", "correct": false}, {"label": "C", "text": "Raised urinary methylmalonic acid levels", "correct": true}, {"label": "D", "text": "Anaemia doesn’t improve after folate administration", "correct": false}], "correct_answer": "C. Raised urinary methylmalonic acid levels", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/OM5EvO9ozGT5g3K9O1FM1736998532.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true when increased urinary formiminoglutamic acid is detected in a patient to whom histidine is given?", "options": [{"label": "A", "text": "Presence of antibodies against intrinsic factor", "correct": false}, {"label": "B", "text": "Deficiency of folic acid is present", "correct": true}, {"label": "C", "text": "Neurological symptoms are common", "correct": false}, {"label": "D", "text": "Presence of worm infestation", "correct": false}], "correct_answer": "B. Deficiency of folic acid is present", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with inflammation of the mouth and tongue. He is a non-vegetarian. As part of the evaluation, a Schilling test was done and found unremarkable. Which of the following investigations could lead to the aetiology behind this presentation?", "options": [{"label": "A", "text": "Serum folate levels", "correct": true}, {"label": "B", "text": "Peripheral blood smear", "correct": false}, {"label": "C", "text": "Anti-IF antibody levels", "correct": false}, {"label": "D", "text": "Serum Vitamin B12 levels", "correct": false}], "correct_answer": "A. Serum folate levels", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stage of test</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>24-hour <span class=\"customMeta\" data-dictid=\"0b72f5e96b16927772018dec8a87e2\">urinary</span> <span class=\"customMeta\" data-dictid=\"0f7653c9ef1692777187deaa35f749\">excretion</span> of radiolabelled B12</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inference</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stage 1:</strong></p>\n<p>Oral radiolabelled B12 + IM dose of unlabelled B12 (to saturate liver stores)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>10% (Normal)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Malnutrition</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><10%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stage 2 of the test is done</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stage 2:</strong></p>\n<p>Oral radiolabelled B12 + <span class=\"customMeta\" data-dictid=\"a6795c876e169277719057a1099465\">Intrinsic</span> factor</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>10%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pernicious anaemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><10%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stage 3 of the test is done</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stage 3:</strong></p>\n<p>Oral radiolabelled B12 + Antibiotics (5-day course)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>10%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small intestinal bacterial overgrowth</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><10%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stage 4 of the test is done</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stage 4:</strong></p>\n<p>Oral radiolabelled B12 + <span class=\"customMeta\" data-dictid=\"b566321fe8169277719716b1cf4df0\">Recombinant</span> pancreatic enzymes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>10%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pancreatic <span class=\"customMeta\" data-dictid=\"80feaae4b31692777190ea1ba3fc25\">insufficiency</span> (Cystic fibrosis, chronic pancreatitis)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><10%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Consider other ileal diseases</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following statements correctly describes the principle of Prussian blue stain?", "options": [{"label": "A", "text": "Ferrocyanide to ferricyanide", "correct": false}, {"label": "B", "text": "Ferrocyanide to ferroferric cyanide", "correct": true}, {"label": "C", "text": "Ferroferric cyanide to ferrocyanide", "correct": false}, {"label": "D", "text": "Ferrocyanide to ferric ferrocyanide", "correct": false}], "correct_answer": "B. Ferrocyanide to ferroferric cyanide", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old child presents to the clinic with symptoms of irritability, abdominal pain, and vomiting. The physician suspects lead poisoning and orders a complete blood count along with a peripheral blood smear. Which of the following findings would most likely be seen on the peripheral blood smear in lead poisoning?", "options": [{"label": "A", "text": "Schistocytes", "correct": false}, {"label": "B", "text": "Spherocytes", "correct": false}, {"label": "C", "text": "Basophilic stippling", "correct": true}, {"label": "D", "text": "Bite cells", "correct": false}], "correct_answer": "C. Basophilic stippling", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/DIcwQO5rGEcQCNFAvzlb1736965357.png", "https://image.prepladder.com/content/1LHw1nbOlcPr6c7DSunD1736965486.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A peripheral blood smear revealed basophilic granules with Prussian blue stain. Which of the following bone marrow cells are associated with this condition?", "options": [{"label": "A", "text": "Sideroblast", "correct": true}, {"label": "B", "text": "Siderocyte", "correct": false}, {"label": "C", "text": "Reticulocyte", "correct": false}, {"label": "D", "text": "Bite cells", "correct": false}], "correct_answer": "A. Sideroblast", "question_images": ["https://image.prepladder.com/content/gDWQ7vwOVMYr7qLKUVUI1736965250.png"], "explanation_images": ["https://image.prepladder.com/content/ioy8WatrqtvihcwujQgy1736964777.png", "https://image.prepladder.com/content/63WSMUyNWLbzqZxJ2DjG1736964877.png", "https://image.prepladder.com/content/BHB1EXnYU1vqCwbu7xmD1736965107.png", "https://image.prepladder.com/content/oI9hKIQCSONJlKMAUusj1736964951.png", "https://image.prepladder.com/content/YoTtBTtc3h9antFz4hsS1736965027.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Peripheral Smear: Pappenheimer bodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone Marrow: Ringed Sideroblasts</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Multiple <span class=\"customMeta\" data-dictid=\"0bc69d6cf8169277718209818c7522\">basophilic</span> iron aggregates</li>\n<li>Stain blue with Perl's/ Prussian blue</li>\n<li>Seen in sideroblastic anemia, lead poisoning, or hemochromatosis</li>\n</ul>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Prof. Erhabor Osaro \" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Basophilic_stippling#/media/File:Basophilic_stippling_2.jpg\" data-tags=\"\" height=\"224\" src=\"https://image.prepladder.com/content/ioy8WatrqtvihcwujQgy1736964777.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Blue granules <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> full or partial ring</li>\n<li>Blasts have a nucleus</li>\n<li>Iron is present in <span class=\"customMeta\" data-dictid=\"18c9e7b9721692777192bd042528cc\">mitochondria</span> in the <span class=\"customMeta\" data-dictid=\"2da8fc47cf169277719576cea1851f\">perinuclear</span> region.</li>\n<li>Stain blue on Perl's/Prussian blue.</li>\n<li>Seen with Sideroblastic <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">anemia</span> and <span class=\"customMeta\" data-dictid=\"29948ab80216927771932de0443c18\">Myelodysplastic</span> syndrome.</li>\n<li>Associated with SF3B1 mutation</li>\n</ul>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Cecilia C.S. Yeung, M.D\" data-hash=\"\" data-license=\"Procured by PL\" data-source=\"https://www.pathologyoutlines.com/topic/myeloproliferativeRARS.html\" data-tags=\"\" height=\"192\" src=\"https://image.prepladder.com/content/63WSMUyNWLbzqZxJ2DjG1736964877.png\" width=\"300\"/></p>\n<br/>\n\t\t\t </td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Siderocyte (Option B)</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"John Lazarchick; Kelcie Brunson; Ginell Post;\" data-hash=\"\" data-license=\"Procured by PL\" data-source=\"https://imagebank.hematology.org/image/3523/siderocytes--1\" data-tags=\"\" height=\"257\" src=\"https://image.prepladder.com/content/BHB1EXnYU1vqCwbu7xmD1736965107.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Red blood cells containing <span class=\"customMeta\" data-dictid=\"9996ef505516927771937fe4ef1222\">non</span> <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> <span class=\"customMeta\" data-dictid=\"5a046503cb169277720259dec3f2be\">ferric</span> iron called <span class=\"customMeta\" data-dictid=\"854c2e6d5a1692777198c7d9aed050\">siderotic</span> granules on <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> <span class=\"customMeta\" data-dictid=\"6777533153169277719804fcbbf2d1\">smear</span> Seen in patients with absent spleen, sideroblastic <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">anemia</span> and <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reticulocyte (Option C)</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Szymon Kierat, Agnieszka Wiśniewska, Michał Mazurkiewicz\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Retikulocyty.jpg\" data-tags=\"\" height=\"251\" src=\"https://image.prepladder.com/content/oI9hKIQCSONJlKMAUusj1736964951.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Immature red blood cells produced in the <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> and released into the <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood</li>\n<li>Brilliant cresyl blue stain</li>\n<li>Seen in <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia, <span class=\"customMeta\" data-dictid=\"39e64c223a169277718792864d4211\">erythroblastosis</span> fetalis and pregnancy.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bite Cells (Degmacytes) (Option D)</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Michelle To and Valentin Villatoro\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://pressbooks.openeducationalberta.ca/mlsci/chapter/abnormal-rbc-morphology-bite-keratocyte-blister-helmet-cell/\" data-tags=\"\" height=\"263\" src=\"https://image.prepladder.com/content/YoTtBTtc3h9antFz4hsS1736965027.png\" width=\"300\"/></p>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Bite cells are erythrocytes with <span class=\"customMeta\" data-dictid=\"863f5457381692777190f05632a8b2\">irregular</span> <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> due to <span class=\"customMeta\" data-dictid=\"96985248371692777188cfb38ca861\">G6PD</span> deficiency</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 7-year-old girl presents to the clinic with complaints of fatigue, weakness, and pale skin. Her mother mentions that she has developed cravings for ice (pica). Laboratory tests reveal microcytic anaemia, and her serum ferritin levels are significantly low. Which of the following is the most likely infectious cause of her condition?", "options": [{"label": "A", "text": "Giardia lamblia", "correct": false}, {"label": "B", "text": "Ancylostoma", "correct": true}, {"label": "C", "text": "Diphyllobothrium latum", "correct": false}, {"label": "D", "text": "Enterobius vermicularis", "correct": false}], "correct_answer": "B. Ancylostoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lab Parameters</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">Anemia</span> (IDA)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ferritin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Transferrin saturation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum Iron</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TIBC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following vitamin deficiencies is most commonly associated with sideroblastic anemia?", "options": [{"label": "A", "text": "Vitamin B1 (Thiamine)", "correct": false}, {"label": "B", "text": "Vitamin B9 (Folic Acid)", "correct": false}, {"label": "C", "text": "Vitamin B6 (Pyridoxine)", "correct": true}, {"label": "D", "text": "Vitamin B12 (Cobalamin)", "correct": false}], "correct_answer": "C. Vitamin B6 (Pyridoxine)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/34IjkVxxTal3I8V4piTG1736964559.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the laboratory findings are suggestive of sideroblastic anemia? Serum Iron Transferrin saturation Serum Ferritin TIBC A. High High High Low B. Low Low Low High C. Low Low High Low D. High Low High Low", "options": [{"label": "A", "text": "A", "correct": true}, {"label": "B", "text": "B", "correct": false}, {"label": "C", "text": "C", "correct": false}, {"label": "D", "text": "D", "correct": false}], "correct_answer": "A. A", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Iron</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Transferrin saturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TIBC</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sideroblastic Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anemia of Chronic Disease</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemolytic Anemia</strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old female with a history of treatment for latent tuberculosis presents with fatigue. Physical examination reveals pallor and mild jaundice. Bone marrow smear revealed the following findings.which of the following is the most likely diagnosis? Options:", "options": [{"label": "A", "text": "Iron deficiency anemia", "correct": false}, {"label": "B", "text": "Megaloblastic anemia", "correct": false}, {"label": "C", "text": "Sideroblastic anemia", "correct": true}, {"label": "D", "text": "Hemolytic anemia", "correct": false}], "correct_answer": "C. Sideroblastic anemia", "question_images": ["https://image.prepladder.com/content/7nwzxTWZC5xm0uoEFtCj1736964328.png"], "explanation_images": ["https://image.prepladder.com/content/w4rRBmCAdvZHzxK6ag8O1736964396.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following new parameters has high specificity for differentiating anemia of chronic disease (ACD) from iron deficiency anemia (IDA)?", "options": [{"label": "A", "text": "Serum transferrin receptor (sTfR)/log - ferritin index &gt;1.5", "correct": false}, {"label": "B", "text": "Serum transferrin receptor (sTfR)/log - ferritin index &lt;1.5", "correct": true}, {"label": "C", "text": "Reduced reticulocyte index", "correct": false}, {"label": "D", "text": "Blood film morphology", "correct": false}], "correct_answer": "B. Serum transferrin receptor (sTfR)/log - ferritin index <1.5", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parameter</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Finding</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> (sTfR)-ferritin index </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>sTfR reflects erythropoiesis, and <span class=\"customMeta\" data-dictid=\"91d0e4c6fa16927772025f96b44b27\">ferritin</span> describes iron stores.</li>\n<li>sTfR/log <span class=\"customMeta\" data-dictid=\"91d0e4c6fa16927772025f96b44b27\">ferritin</span> index > 1.5 in all cases of <span class=\"customMeta\" data-dictid=\"481654cbe5169277718969e80e1598\">IDA</span> and <span class=\"customMeta\" data-dictid=\"f0d6bec9af1692777180cefac8615a\">ACD</span> with coexisting IDA.<strong> (Option A)</strong></li>\n<li>sTfR/log <span class=\"customMeta\" data-dictid=\"91d0e4c6fa16927772025f96b44b27\">ferritin</span> index <strong>< 1.5 in pure <span class=\"customMeta\" data-dictid=\"f0d6bec9af1692777180cefac8615a\">ACD</span> </strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reticulocyte index</strong></p>\n<p><strong>(</strong><strong>Option </strong><strong>C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Normal = 0.5-2.5%</li>\n<li>Reduced in <span class=\"customMeta\" data-dictid=\"481654cbe5169277718969e80e1598\">IDA</span> and AOCD</li>\n<li>Increased in <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Blood film morphology</strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Predominantly: normocytic and normochromic anemia.</li>\n<li>Less commonly: <span class=\"customMeta\" data-dictid=\"d09dc1da551692777192706b7f882e\">microcytic</span> and <span class=\"customMeta\" data-dictid=\"07ccd8f461169277718970a6f1a131\">hypochromic</span> <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">anemia</span> (also in IDA).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 52-year-old female complains of fatigue, joint pain, and stiffness, especially in the mornings. Physical examination reveals swollen and tender joints in her wrists with ulnar deviation at metacarpophalangeal joints. Which of the following lab findings is not associated with this condition?", "options": [{"label": "A", "text": "Low serum iron", "correct": false}, {"label": "B", "text": "Low transferrin saturation", "correct": false}, {"label": "C", "text": "High ferritin", "correct": false}, {"label": "D", "text": "High total iron-binding capacity (TIBC)", "correct": true}], "correct_answer": "D. High total iron-binding capacity (TIBC)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lab Parameters</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AOCD </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron Deficiency Anemia (IDA)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ferritin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>High (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Transferrin saturation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Low (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum Iron</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Low (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TIBC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Low (characteristic)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>High (Option D)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is considered the most significant inflammatory mediator in the pathophysiology of anemia of chronic disease (AOCD)?", "options": [{"label": "A", "text": "Interleukin-6", "correct": true}, {"label": "B", "text": "Transferrin", "correct": false}, {"label": "C", "text": "Interleukin-10", "correct": false}, {"label": "D", "text": "Interferon-γ", "correct": false}], "correct_answer": "A. Interleukin-6", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AOCD</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum iron</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Transferrin saturation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ferritin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TIBC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old female with a history of breast cancer presents with fatigue and pallor. Laboratory results indicate a hemoglobin level of 9.7 g/dL, low serum iron, elevated ferritin, and low total iron-binding capacity (TIBC). All of the following are true regarding this condition except? Anemia is caused by reduced erythroid progenitor proliferation and iron uptake. Causes include chronic infections, autoimmune disorders and lymphoma. Peripheral smear does not show microcytic hypochromic anemia. All the patients benefit from erythropoietin administration.", "options": [{"label": "A", "text": "1, 3, 4", "correct": false}, {"label": "B", "text": "3, 4", "correct": true}, {"label": "C", "text": "4 only", "correct": false}, {"label": "D", "text": "3 only", "correct": false}], "correct_answer": "B. 3, 4", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following investigations is the least helpful in determining the underlying cause of anemia?", "options": [{"label": "A", "text": "MCV", "correct": false}, {"label": "B", "text": "MCH", "correct": true}, {"label": "C", "text": "Peripheral smear", "correct": false}, {"label": "D", "text": "Reticulocyte count", "correct": false}], "correct_answer": "B. MCH", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/L6BhNjdscd5dDQ5jKUWY1736959971.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 24-year-old female with severe anemia started on parenteral iron. Which of the following would occur first in this patient as a response to therapy?", "options": [{"label": "A", "text": "Increase in serum iron level", "correct": true}, {"label": "B", "text": "Erythroid hyperplasia in bone marrow", "correct": false}, {"label": "C", "text": "Increase in MCV", "correct": false}, {"label": "D", "text": "Increase in reticulocyte count", "correct": false}], "correct_answer": "A. Increase in serum iron level", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>12 to 24 hours</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Replenishment of <span class=\"customMeta\" data-dictid=\"a621be29da16927771901bc91014d1\">intracellular</span> iron enzymes, decreased irritability; increased appetite, increase in <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> iron.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>36 to 48 hours</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Erythroid <span class=\"customMeta\" data-dictid=\"4c5d5ef6c31692777189820d4b320d\">hyperplasia</span> in bone marrow</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>48 to 72 hours</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reticulocytosis, peaking at 5-7 days</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4 to 30 days</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increase in <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> level, increase in ferritin, increase in MCV</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1 to 3 months</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Repletion of stores</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old female presented with easy fatigability and dyspnea on exertion. She was found to have a hemoglobin of 6 g/dL. What will be most likely finding in the peripheral blood smear of this patient?", "options": [{"label": "A", "text": "Macrocytic red cells", "correct": false}, {"label": "B", "text": "Cabot ring", "correct": false}, {"label": "C", "text": "Hypersegmented neutrophils", "correct": false}, {"label": "D", "text": "Microcytic and hypochromic red cells", "correct": true}], "correct_answer": "D. Microcytic and hypochromic red cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/kXePzbR3vFUm542kQ1gk1736961564.png", "https://image.prepladder.com/content/wvXG6krXhJcnpZjPVVXm1736962787.png", "https://image.prepladder.com/content/zAR4KNWfmgqB3PUIFQBZ1736962838.png", "https://image.prepladder.com/content/Cbh8E5IZCnJbxe8NxsDp1736962878.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old female diagnosed with iron deficiency anemia is prescribed oral iron supplements. Foods containing which of the following can she take to increase iron absorption?", "options": [{"label": "A", "text": "Ascorbate", "correct": true}, {"label": "B", "text": "Oxalate", "correct": false}, {"label": "C", "text": "Carbonate", "correct": false}, {"label": "D", "text": "Phosphate", "correct": false}], "correct_answer": "A. Ascorbate", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Enhancers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inhibitors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ascorbic acid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tannins</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Citric acid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Carbonate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Amino acid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Oxalate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sugars in the diet</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Phosphate</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In a patient diagnosed with iron deficiency anemia, the values of all of the following increase except?", "options": [{"label": "A", "text": "Total iron binding capacity", "correct": false}, {"label": "B", "text": "RBC protoporphyrin", "correct": false}, {"label": "C", "text": "Transferrin saturation", "correct": true}, {"label": "D", "text": "Transferrin receptor", "correct": false}], "correct_answer": "C. Transferrin saturation", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/GLgekPjqltwSXQO52D641736961104.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old girl presented with fatigue and weakness. Her laboratory results show reduced hemoglobin, MCV 75 fl, MCH 22 pg and RDW 28. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Iron deficiency anemia", "correct": true}, {"label": "B", "text": "Megaloblastic anemia", "correct": false}, {"label": "C", "text": "Sideroblastic anemia", "correct": false}, {"label": "D", "text": "Thalassemia major", "correct": false}], "correct_answer": "A. Iron deficiency anemia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male patient was diagnosed with iron deficiency anemia. Which of the following is true about the intracellular regulation of iron in the above condition? IRP- Iron regulatory protein IRE- Iron response elements", "options": [{"label": "A", "text": "Ferritin translation is increased by binding IRP to IRE.", "correct": false}, {"label": "B", "text": "Ferritin translation is decreased by binding IRP to IRE.", "correct": true}, {"label": "C", "text": "Transferrin receptor 1 translation is unaffected by binding IRP to IRE.", "correct": false}, {"label": "D", "text": "Transferrin receptor 1 translation is decreased by binding IRP to IRE.", "correct": false}], "correct_answer": "B. Ferritin translation is decreased by binding IRP to IRE.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which transport molecule facilitates the absorption of Fe2+ into enterocytes in the small intestine?", "options": [{"label": "A", "text": "Ferroportin", "correct": false}, {"label": "B", "text": "Hephaestin", "correct": false}, {"label": "C", "text": "DMT-1", "correct": true}, {"label": "D", "text": "Hepcidin", "correct": false}], "correct_answer": "C. DMT-1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/bBPf2wwUmB1VBCiNbmz21736960692.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old woman presents with fatigue and pallor. Lab tests show hemoglobin of 9 g/dL and MCV of 68 fL. Peripheral smear reveals microcytic and hypochromic red blood cells. Her symptoms and laboratory findings are consistent with iron deficiency anemia. Which of the following statements regarding iron deficiency anemia (IDA) is correct?", "options": [{"label": "A", "text": "Serum ferritin levels are elevated.", "correct": false}, {"label": "B", "text": "Serum ferritin is the gold standard investigation", "correct": false}, {"label": "C", "text": "Decreased serum ferritin levels", "correct": true}, {"label": "D", "text": "Serum ferritin levels are not affected.", "correct": false}], "correct_answer": "C. Decreased serum ferritin levels", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low (< 30 ng/mL) indicates depleted iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low levels are seen in iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anemia.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"8724f10741169277720096af709b1b\">TIBC</span> reflects the increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Red Cell Distribution <span class=\"customMeta\" data-dictid=\"1b0d31fe811692777202644090ba60\">Width</span> (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased RDW is often seen in iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">Aspiration</span> and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Confirmatory test</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old woman has been experiencing fatigue, pallor, and shortness of breath for the past six months. Laboratory tests reveal a Hb of 6 gm/dl. Red cell distribution width is increased. Peripheral smear is shown below. Where is the likely site of absorption of the micronutrient deficient in this patient?", "options": [{"label": "A", "text": "Jejunum", "correct": false}, {"label": "B", "text": "Ileum", "correct": false}, {"label": "C", "text": "Duodenum", "correct": true}, {"label": "D", "text": "Colon", "correct": false}], "correct_answer": "C. Duodenum", "question_images": ["https://image.prepladder.com/content/kgvQQpwBIembr2H5JznJ1736960112.png"], "explanation_images": ["https://image.prepladder.com/content/z6RPy7i8mpDbyk8l13r61736960185.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Duodenum</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Jejunum</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ileum</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Colon</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Folic acid</strong>, <span class=\"customMeta\" data-dictid=\"543f207eb51692777181723491a358\">amino</span> acids, glucose, <span class=\"customMeta\" data-dictid=\"bc6cd9a9f9169277720261812ea113\">fatty</span> acids</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Vitamin B12</strong>, <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> salts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Water, electrolytes like sodium and chloride, vitamins</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are causes of microcytic hypochromic anemia except?", "options": [{"label": "A", "text": "Iron deficiency anemia", "correct": false}, {"label": "B", "text": "Sideroblastic anemia", "correct": false}, {"label": "C", "text": "Thalassemia", "correct": false}, {"label": "D", "text": "Hereditary spherocytosis", "correct": true}], "correct_answer": "D. Hereditary spherocytosis", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microcytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Normocytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macrocytic Anaemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>S</strong>ideroblastic anemia.</li>\n<li><strong>I</strong>ron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anemia.</li>\n<li><strong>T</strong>halassemia.</li>\n<li><strong>A</strong>nemia of chronic disease.</li>\n<li><strong>L</strong>ead poisoning.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>(Mnemonic- SITAL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Acute Blood Loss</li>\n<li>Hemolytic Anaemia (hereditary spherocytosis)</li>\n<li>Anemia of Chronic Disease</li>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> Disorders (e.g., <span class=\"customMeta\" data-dictid=\"1ea06afcbd1692777181199bfa3300\">Aplastic</span> Anaemia)</li>\n<li>Renal Disease</li>\n<li>Endocrine Disorders (e.g., Hypothyroidism)</li>\n<li>Early stages of Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vitamin B12 Deficiency</li>\n<li>Folate Deficiency</li>\n<li>Alcohol Abuse</li>\n<li>Liver Disease</li>\n<li>Hypothyroidism</li>\n<li>Myelodysplastic Syndrome</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 32 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A software engineer presents to the outpatient department with easy fatiguability. He gives a history of sitting in front of the computer for 12-14 hours. He consumes a lot of junk food with very few fruits and vegetables. Hb is 9 g/dl, and MCV is 80 fl. What is the most likely cause of this patient’s anemia?", "options": [{"label": "A", "text": "Cyanocobalamin deficiency", "correct": false}, {"label": "B", "text": "Iron deficiency", "correct": true}, {"label": "C", "text": "Folic acid deficiency", "correct": false}, {"label": "D", "text": "Hereditary spherocytosis", "correct": false}], "correct_answer": "B. Iron deficiency", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Microcytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Normocytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Macrocytic Anaemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>S</strong>ideroblastic anemia.</li>\n<li><strong>I</strong>ron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia.</li>\n<li><strong>T</strong>halassemia.</li>\n<li><strong>A</strong>nemia of chronic disease.</li>\n<li><strong>L</strong>ead poisoning.</li>\n</ul>\n<p> </p>\n<p><strong>(Mnemonic- SITAL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Acute Blood Loss</li>\n<li>Hemolytic Anaemia(hereditary spherocytosis)</li>\n<li>Anemia of Chronic Disease</li>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> Disorders (e.g., <span class=\"customMeta\" data-dictid=\"1ea06afcbd1692777181199bfa3300\">Aplastic</span> Anaemia)</li>\n<li>Renal Disease</li>\n<li>Endocrine Disorders (e.g., Hypothyroidism)</li>\n<li>Early stages of iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Vitamin B12 Deficiency</li>\n<li>Folate Deficiency</li>\n<li>Alcohol Abuse</li>\n<li>Liver Disease</li>\n<li>Hypothyroidism</li>\n<li>Myelodysplastic Syndrome</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient is diagnosed with B-cell leukaemia. Which of the following are poor prognostic factors? Hyperdiploidy Age &lt;1 year t(9:22) t(4:11)", "options": [{"label": "A", "text": "A, C, D", "correct": false}, {"label": "B", "text": "C, D", "correct": false}, {"label": "C", "text": "A, B, C, D", "correct": false}, {"label": "D", "text": "B, C, D", "correct": true}], "correct_answer": "D. B, C, D", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Favorable <span class=\"customMeta\" data-dictid=\"cfb6c738351692777196f69788a66e\">Prognostic</span> factors </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Unfavorable <span class=\"customMeta\" data-dictid=\"cfb6c738351692777196f69788a66e\">prognostic</span> factors </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Age: 1-10 years</li>\n<li>Leucocyte count < 50000/µl</li>\n<li><strong>Hyperploidy</strong></li>\n<li>t (12:21)</li>\n<li>L1 ALL</li>\n<li>Response to treatment</li>\n<li>Early <span class=\"customMeta\" data-dictid=\"d80014dfb516927771962b4857d683\">Pre</span> B-cell ALL</li>\n<li>Female</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Extreme age group</strong>: <strong><1 year</strong> or >10 years</li>\n<li>Hypoploidy</li>\n<li><strong>t(9:22)</strong> and <strong>t(4:11)</strong></li>\n<li>L2 and L3 ALL and <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> B cell ALL</li>\n<li>Total <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> count >50,000/cubic.mm</li>\n<li>Black males</li>\n<li>Organomegaly</li>\n<li>CNS Leukemia</li>\n<li>Absence of CD10</li>\n</ul>\n<ul>\n<li>Remission> 14 days</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are seen in the anaemia of chronic disease, except:", "options": [{"label": "A", "text": "High serum hepcidin", "correct": false}, {"label": "B", "text": "Low serum ferritin", "correct": true}, {"label": "C", "text": "Chronic infection", "correct": false}, {"label": "D", "text": "Normal iron stores", "correct": false}], "correct_answer": "B. Low serum ferritin", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:614px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Iron</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Transferrin saturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TIBC</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sideroblastic Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anaemia of Chronic Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>High</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemolytic Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old boy presents with fatigue. Investigations reveal the following: Hemoglobin: 9 g/dL MCV: 80 fL MCH: 29 pg Serum ferritin: 185 μg/L TLC: Elevated with predominant lymphocytes and neutrophils. What is the likely diagnosis for this patient?", "options": [{"label": "A", "text": "Thalassemia", "correct": false}, {"label": "B", "text": "Anemia of chronic disorder", "correct": true}, {"label": "C", "text": "Iron deficiency anaemia", "correct": false}, {"label": "D", "text": "Sickle cell anemia", "correct": false}], "correct_answer": "B. Anemia of chronic disorder", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:612px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Iron</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Transferrin saturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TIBC</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sideroblastic Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anemia of Chronic Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>High</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemolytic Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis for an 18-year-old male with gum bleeding, fever for two months, pallor, low haemoglobin (3 gm/dL), low TLC (1500/microL), low platelet count (15000/microL), macrocytes on peripheral smear, 0.5% reticulocyte count, and bone marrow examination showing fatty streaks and a lack of megakaryocytes but no immature cells?", "options": [{"label": "A", "text": "Idiopathic acquired aplastic anemia", "correct": true}, {"label": "B", "text": "Paroxysmal nocturnal hemoglobinuria", "correct": false}, {"label": "C", "text": "Myelodysplastic syndrome", "correct": false}, {"label": "D", "text": "Tuberculosis", "correct": false}], "correct_answer": "A. Idiopathic acquired aplastic anemia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 24-year-old male patient presents with anaemia. Both his father and paternal aunt experienced similar illnesses and were effectively treated with splenectomy. The patient's peripheral blood smear resembles the one depicted in the accompanying illustration, showing spherocytes. What other abnormalities can be anticipated?", "options": [{"label": "A", "text": "Decreased osmotic fragility", "correct": false}, {"label": "B", "text": "Decreased reticulocytes", "correct": false}, {"label": "C", "text": "Heinz bodies", "correct": false}, {"label": "D", "text": "Howell-Jolly bodies", "correct": true}], "correct_answer": "D. Howell-Jolly bodies", "question_images": ["https://image.prepladder.com/content/2G8CkGGSLgjUJTzSb56Z1746087359.png"], "explanation_images": ["https://image.prepladder.com/content/a7ghizppD28lqALjeQWB1746087415.png", "https://image.prepladder.com/content/CXyCDGVe3Kl4N1mZsHKh1746087386.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not likely to be seen in a patient with paroxysmal nocturnal hemoglobinuria (PNH)?", "options": [{"label": "A", "text": "Aplastic anemia", "correct": false}, {"label": "B", "text": "Leukaemia", "correct": true}, {"label": "C", "text": "Thrombosis", "correct": false}, {"label": "D", "text": "Hemolysis", "correct": false}], "correct_answer": "B. Leukaemia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male patient was diagnosed with iron deficiency anaemia. Which of the following is true about the intracellular regulation of iron in the above condition?", "options": [{"label": "A", "text": "Ferritin translation is increased by binding IRP to IRE", "correct": false}, {"label": "B", "text": "Ferritin translation is decreased by binding IRP to IRE", "correct": true}, {"label": "C", "text": "Transferrin receptor 1 translation is unaffected by binding IRP to IRE", "correct": false}, {"label": "D", "text": "Transferrin receptor 1 translation is decreased by binding IRP to IRE", "correct": false}], "correct_answer": "B. Ferritin translation is decreased by binding IRP to IRE", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are associated with massive splenomegaly, except:", "options": [{"label": "A", "text": "Chronic myeloid leukemia", "correct": false}, {"label": "B", "text": "Aplastic anemia", "correct": true}, {"label": "C", "text": "Hairy cell leukemia", "correct": false}, {"label": "D", "text": "Lymphoma", "correct": false}], "correct_answer": "B. Aplastic anemia", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/602OS2ZwuJkYgKOI2Awl1747052677.png", "https://image.prepladder.com/notes/HmI8MNaRccQPFMQV6QGc1747052791.png", "https://image.prepladder.com/notes/BHCIpbXMuIGHVDsKvDaR1747052826.png", "https://image.prepladder.com/notes/wYkO9OKcKwASSvZLd8DR1745313517.png", "https://image.prepladder.com/notes/m7JUWLdd4s2y5UXKHUXL1745313561.png"], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>Aplastic Anemia</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>It refers to a syndrome of chronic primary <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">hematopoietic</span> failure and attendant pancytopenia.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Cause </p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Acquired</p>\n<ul>\n<li>Idiopathic</li>\n<li>Acquired stem cell defects</li>\n<li>Immune-mediated</li>\n</ul>\n<p>Chemical agents</p>\n<ul>\n<li>Dose-related (Alkylating agents, antimetabolites, benzene, chloramphenicol, <span class=\"customMeta\" data-dictid=\"fae9d02cdc1692777190a3151d6fef\">inorganic</span> arsenicals)</li>\n<li>Idiosyncratic (Chloramphenicol, phenylbutazone, organic arsenicals, methylphenylethylhydantoin, carbamazepine, penicillamine, gold salts)</li>\n</ul>\n<p>Physical agents</p>\n<ul>\n<li>Whole-body irradiation</li>\n<li>Viral infections</li>\n<li>Hepatitis (unknown virus)</li>\n<li>Cytomegalovirus infections</li>\n<li>Epstein-Barr virus infections</li>\n<li>Herpes <span class=\"customMeta\" data-dictid=\"03350c16f71692777202dbca70976e\">zoster</span> (varicella zoster)</li>\n</ul>\n<p>Inherited</p>\n<ul>\n<li>Fanconi anemia</li>\n<li>Telomerase defects</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Pathogenesis</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>The <span class=\"customMeta\" data-dictid=\"715b4caf0316927771943797627d8d\">pathogenesis</span> of <span class=\"customMeta\" data-dictid=\"1ea06afcbd1692777181199bfa3300\">aplastic</span> anaemia is not fully understood. However, two major etiologies have been invoked:</p>\n<ul>\n<li>Extrinsic (immune-mediated <span class=\"customMeta\" data-dictid=\"7b7c55fbdd16927771990b50bda606\">suppression</span> of <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> progenitors)</li>\n<li>Intrinsic (abnormality of stem cells)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Clinical features</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Onset: Insidious.</li>\n<li>Pancytopenia</li>\n<li>Anaemia (progressive weakness, pallor, and dyspnea)</li>\n<li>Thrombocytopenia (petechiae and ecchymoses)</li>\n<li>Neutropenia (frequent and persistent infections or the sudden onset of chills, fever, and prostration).</li>\n<li>Splenomegaly is absent (Option B)</li>\n<li>The red cells are usually slightly macrocytic and normochromic.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Microscopy</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Hypocellular <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> is largely devoid of <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">hematopoietic</span> cells; often, only fat cells, <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> stroma, and scattered lymphocytes and <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells remain.</li>\n<li>Marrow aspirates often yield little material (a “dry tap”).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child presented with bilateral proptosis. From the peripheral smear, he was suspected to have chloroma. What is the next investigation of choice?", "options": [{"label": "A", "text": "Platelet count", "correct": false}, {"label": "B", "text": "WBC count", "correct": false}, {"label": "C", "text": "Flow cytometry", "correct": false}, {"label": "D", "text": "Bone marrow biopsy", "correct": true}], "correct_answer": "D. Bone marrow biopsy", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/v3J2ohHNb1fqRg3xjrOL1747125532.jpg", "https://image.prepladder.com/notes/TfEIEe6Iqb9VnuLbL5aG1745314416.png", "https://image.prepladder.com/notes/vNhaSkRuKkTKbax1iMpo1745314475.jpg"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding the effect of glucose-6-phosphate dehydrogenase deficiency is correct? Decrease in reduced glutathione Decrease NADPH Decreased lipid peroxidation Decreased RBC membrane damage", "options": [{"label": "A", "text": "Only 1 is correct", "correct": false}, {"label": "B", "text": "1 &amp; 2 are correct", "correct": true}, {"label": "C", "text": "2 &amp; 3 are correct", "correct": false}, {"label": "D", "text": "1, 2 &amp; 4 are correct", "correct": false}], "correct_answer": "B. 1 & 2 are correct", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/e2ALXa3m0qdSAOECw4M31745314924.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is used in treating sideroblastic anaemia?", "options": [{"label": "A", "text": "Vitamin B12", "correct": false}, {"label": "B", "text": "Vitamin B6", "correct": true}, {"label": "C", "text": "Vitamin B1", "correct": false}, {"label": "D", "text": "Iron", "correct": false}], "correct_answer": "B. Vitamin B6", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/8yjUZOAE5lDqfTgqymwE1745315678.png", "https://image.prepladder.com/notes/NlQPfI0vEg4AGXbdrnQr1745315711.png"], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>Sideroblastic Anemia</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" rowspan=\"1\">\n<p>It is a condition characterized by <span class=\"customMeta\" data-dictid=\"144d78fe4816927771852de984c62f\">defective</span> <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> in the bone marrow, leading to the accumulation of iron within the <span class=\"customMeta\" data-dictid=\"18c9e7b9721692777192bd042528cc\">mitochondria</span> of <span class=\"customMeta\" data-dictid=\"248111ded81692777197946454db52\">red blood cell</span> precursors (sideroblasts).</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Causes</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Congenital causes: Due to <span class=\"customMeta\" data-dictid=\"0f160e4e42169277718771b715516a\">enzyme</span> deficiencies like <span class=\"customMeta\" data-dictid=\"eaa99cd1ab16927771803509d276b7\">ALA</span> synthase, ferrochelatase, etc.</li>\n<li>Acquired causes</li>\n</ul>\n<ul>\n<li>Vitamin B6 deficiency</li>\n<li>Drugs like <span class=\"customMeta\" data-dictid=\"5d8c24b3cb16927771909a5195d7f8\">isoniazid</span> and chloramphenicol</li>\n<li>Lead and alcohol poisoning</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Pathogenesis</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Vitamin B6 is crucial for the proper function of enzymes in <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> synthesis.</li>\n<li>As a <span class=\"customMeta\" data-dictid=\"a416d7580c1692777184952da793d1\">cofactor</span> for <span class=\"customMeta\" data-dictid=\"dbc9f55ceb1692777181e61f6b6361\">aminolevulinic acid</span> synthase, it aids in the first step of <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> production.</li>\n<li>Ensuring sufficient vitamin B6 restores <span class=\"customMeta\" data-dictid=\"0f160e4e42169277718771b715516a\">enzyme</span> activity, supports <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> synthesis, and helps alleviate symptoms of sideroblastic anaemia.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Microscopy</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Peripheral Smear: Pappenheimer bodies</p>\n<ul>\n<li>Multiple <span class=\"customMeta\" data-dictid=\"0bc69d6cf8169277718209818c7522\">basophilic</span> iron aggregates</li>\n<li>Stain blue with Perl's/ Prussian blue</li>\n<li>Seen in sideroblastic anaemia, lead poisoning, or hemochromatosis</li>\n</ul>\n<p> </p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image17\" data-author=\"Prof. Erhabor Osaro \" data-hash=\"10956\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Basophilic_stippling#/media/File:Basophilic_stippling_2.jpg\" data-tags=\"April2025\" height=\"299\" src=\"https://image.prepladder.com/notes/8yjUZOAE5lDqfTgqymwE1745315678.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n<p>Bone Marrow: Ringed Sideroblasts</p>\n<ul>\n<li>Blue granules <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> a full or partial ring</li>\n<li>Blasts have a nucleus</li>\n<li>Iron is present in <span class=\"customMeta\" data-dictid=\"18c9e7b9721692777192bd042528cc\">mitochondria</span> in the <span class=\"customMeta\" data-dictid=\"2da8fc47cf169277719576cea1851f\">perinuclear</span> region.</li>\n<li>Stain blue on Perl's/Prussian blue.</li>\n<li>Seen with Sideroblastic <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">anemia</span> and Myelodysplastic syndrome.</li>\n<li>Associated with SF3B1 mutation</li>\n</ul>\n<p> </p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image24\" data-author=\"Cecilia C.S. Yeung, M.D\" data-hash=\"10958\" data-license=\"NA\" data-source=\"https://www.pathologyoutlines.com/topic/myeloproliferativeRARS.html\" data-tags=\"April2025\" height=\"256\" src=\"https://image.prepladder.com/notes/NlQPfI0vEg4AGXbdrnQr1745315711.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n<p> </p>\n<p>Vitamin B1 (Option C), or thiamine, plays a key role in carbohydrate <span class=\"customMeta\" data-dictid=\"5b1a045f5f169277719210c0ac7a1e\">metabolism</span> and nerve function. Its <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> causes conditions like Wernicke-Korsakoff syndrome and Beriberi, but it is not <span class=\"customMeta\" data-dictid=\"8d0fca798b1692777191b6cd41880f\">linked</span> to sideroblastic anaemia.</p>\n<p>Vitamin B12 (Option A) deficiency causes megaloblastic anaemia and neurological symptoms. It results from poor diet, malabsorption, or lack of <span class=\"customMeta\" data-dictid=\"a6795c876e169277719057a1099465\">intrinsic</span> factors. In sideroblastic anaemia, vitamin B6 is used instead of vitamin B12 because it helps correct the <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> defect, while B12 is not involved in this process.</p>\n<p> </p>\n<p>Iron (Option D) deficiency presents with symptoms like pale skin, shortness of breath, <span class=\"customMeta\" data-dictid=\"21b3779eca1692777186ec4f369d76\">dizziness</span> or lightheadedness, <span class=\"customMeta\" data-dictid=\"e30073048816927771830d431eabfe\">brittle</span> nails, headaches, <span class=\"customMeta\" data-dictid=\"0b3210724e169277719753a1b9e6f5\">restless legs</span> syndrome, etc. In sideroblastic anaemia, treatment focuses on addressing the underlying cause, as the main issue is impaired <span class=\"customMeta\" data-dictid=\"d4fff554a316927771885dc8700abe\">heme</span> synthesis. Iron supplementation is generally ineffective and may worsen the condition by increasing iron accumulation in tissues.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In iron deficiency anaemia, all of the following are increased except:", "options": [{"label": "A", "text": "Transferrin saturation", "correct": true}, {"label": "B", "text": "RBC protoporphyrin", "correct": false}, {"label": "C", "text": "Total iron binding capacity", "correct": false}, {"label": "D", "text": "Ferritin soluble receptors", "correct": false}], "correct_answer": "A. Transferrin saturation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:609px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low (< 30 ng/mL)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> <span class=\"customMeta\" data-dictid=\"e4696a0f8d169277719865588e55c7\">saturation</span> </strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC) (Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased: TIBC reflects the increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Red Cell Distribution <span class=\"customMeta\" data-dictid=\"1b0d31fe811692777202644090ba60\">Width</span> (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Ferritin <span class=\"customMeta\" data-dictid=\"845fedd06d16927771989597afa034\">soluble</span> receptors (sTfR)(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>RBC <span class=\"customMeta\" data-dictid=\"510ec2d8ea1692777196c492eae686\">protoporphyrin</span> (Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone Marrow Aspiration and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Confirmatory test for Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An 18-year-old male presented to the outpatient department with gum bleeding and fever for the past 2 months. The general examination showed pallor, and the systemic examination was unremarkable. Laboratory examination revealed a Hb level of 3 g/dl, a TLC of 1500/microL, and a platelet count of 15,000/microL. A peripheral smear shows macrocytes, and the reticulocyte count is 0.5%. A bone marrow examination revealed fatty streaks and absent megakaryocytes with no immature cells. What is the likely diagnosis?", "options": [{"label": "A", "text": "Idiopathic acquired aplastic anaemia", "correct": true}, {"label": "B", "text": "Paroxysmal nocturnal hemoglobinuria", "correct": false}, {"label": "C", "text": "Myelodysplastic syndrome", "correct": false}, {"label": "D", "text": "Tuberculosis", "correct": false}], "correct_answer": "A. Idiopathic acquired aplastic anaemia", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/bYBJ0iKpgXkrSnnYzh8j1746443063.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In a patient of hereditary spherocytosis, which of the following organisms is likely to attack progenitor cells, resulting in aplastic anemia?", "options": [{"label": "A", "text": "CMV", "correct": false}, {"label": "B", "text": "EBV", "correct": false}, {"label": "C", "text": "Parvovirus B19", "correct": true}, {"label": "D", "text": "HSV", "correct": false}], "correct_answer": "C. Parvovirus B19", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"4c37b9980316927771941adbff3e43\">Parvovirus</span> B19\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Rees and Ecker diluting fluid is used in:", "options": [{"label": "A", "text": "Wintrobe tube", "correct": false}, {"label": "B", "text": "WBC pipette", "correct": false}, {"label": "C", "text": "RBC pipette", "correct": true}, {"label": "D", "text": "Hemoglobin pipette", "correct": false}], "correct_answer": "C. RBC pipette", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Components</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Value</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Sodium citrate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">3.8g</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Formaldehyde (40%)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">0.2ml</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Brilliant cresyl blue</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">0.1g</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Distilled water</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">100ml</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is your diagnosis with respect to the findings shown in the peripheral smear:", "options": [{"label": "A", "text": "Iron deficiency anaemia", "correct": false}, {"label": "B", "text": "Vitamin B12 deficiency", "correct": true}, {"label": "C", "text": "Hereditary spherocytosis", "correct": false}, {"label": "D", "text": "Acute myeloid leukemia", "correct": false}], "correct_answer": "B. Vitamin B12 deficiency", "question_images": ["https://image.prepladder.com/content/uBjBonEzNpyNtiVmHRsv1745836945.png"], "explanation_images": ["https://image.prepladder.com/notes/DBO9PJ9WTGjj1MAU90do1746608239.jpg"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Biochemical Tests</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"8\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hypercellular bone marrow</li>\n<li>Erythroid Hyperplasia</li>\n<li>Sieve-like chromatin</li>\n<li><strong>Hypersegmented neutrophils</strong></li>\n<li>Reversal of myeloid: <span class=\"customMeta\" data-dictid=\"892718f3e916927771871389d2e1a3\">erythroid</span> ratio 1:1 or less (Normal: 3:1)</li>\n<li>Nuclear-cytoplasmic asynchrony.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Bone marrow findings in vit B12 def\" data-author=\"Dominic J. Harrington\" data-hash=\"12341\" data-license=\"NA\" data-source=\"https://www.sciencedirect.com/science/article/abs/pii/B9780128130506000127\" data-tags=\"May2025\" height=\"418\" src=\"https://image.prepladder.com/notes/DBO9PJ9WTGjj1MAU90do1746608239.jpg\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td rowspan=\"8\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Serum bilirubin: Increases</li>\n<li>Serum LDH: Increases</li>\n<li>Vitamin B12: Decreases</li>\n<li>Folic acid: Decreases</li>\n<li>Anti-intrinsic factor (IF) antibody: Present (Pernicious anaemia)</li>\n<li>Methylmalonyl CoA: Increases</li>\n<li>Homocysteine: Increases</li>\n<li>Schilling Test: Assess the cause of B12 deficiency.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Folic Acid Deficiency </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Vitamin B12 Deficiency </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Site of <span class=\"customMeta\" data-dictid=\"5fcb9396d1169277718069dd7fa788\">absorption</span> - Jejunum.</li>\n<li>Seen in: Alcoholics, pregnancy.</li>\n<li>Causes <span class=\"customMeta\" data-dictid=\"b00388be25169277719369b3ab059f\">neural</span> tube defects.</li>\n<li>Neurological symptoms are not seen.</li>\n<li>Normal methylmalonic acid.</li>\n<li>High homocysteine.</li>\n<li>FIGLU test positive.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Site of <span class=\"customMeta\" data-dictid=\"5fcb9396d1169277718069dd7fa788\">absorption</span> - Ileum.</li>\n<li>Seen in: Vegetarians, pregnancy, Diphyllobothrium latum infection.</li>\n<li>Neurological manifestation: Subacute combined degeneration.</li>\n<li>High methylmalonic acid.</li>\n<li>High homocysteine.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the cells marked in the given image:", "options": [{"label": "A", "text": "Lymphocyte-1, Monocyte-4, Eosinophil-2, Basophil-3", "correct": false}, {"label": "B", "text": "Lymphocyte-2, Monocyte-4, Eosinophil-1, Basophil-3", "correct": true}, {"label": "C", "text": "Lymphocyte-1, Monocyte-2, Eosinophil-3, Basophil-4", "correct": false}, {"label": "D", "text": "Lymphocyte-2, Monocyte-1, Eosinophil-3, Basophil-4", "correct": false}], "correct_answer": "B. Lymphocyte-2, Monocyte-4, Eosinophil-1, Basophil-3", "question_images": ["https://image.prepladder.com/notes/68hI5cLNAmijjjWVHpS41746608357.png"], "explanation_images": ["https://image.prepladder.com/notes/kMFiGfZOfN9q0ZMQA98i1746608470.jpg", "https://image.prepladder.com/notes/DFtSRhGghUz7q2vRqPXm1746608492.jpg"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not true about stem cells?", "options": [{"label": "A", "text": "They can differentiate", "correct": false}, {"label": "B", "text": "They can replicate", "correct": false}, {"label": "C", "text": "They can divide without any regulatory stimulus", "correct": true}, {"label": "D", "text": "They can regenerate damaged tissues", "correct": false}], "correct_answer": "C. They can divide without any regulatory stimulus", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding glucose-6-phosphate dehydrogenase (G6PD) deficiency?", "options": [{"label": "A", "text": "Spectrin defect", "correct": false}, {"label": "B", "text": "Bite cells are present", "correct": true}, {"label": "C", "text": "Cells do not lyse in a hypotonic solution", "correct": false}, {"label": "D", "text": "Cells lyse in hypertonic solution", "correct": false}], "correct_answer": "B. Bite cells are present", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/vkVubf4pUuv23XMZZsiU1745495559.png", "https://image.prepladder.com/content/PkHpWZjcYoJgUJALRU4l1745495565.png", "https://image.prepladder.com/content/N1PBFfQnHMeecvmIAQ4Q1745495572.png", "https://image.prepladder.com/notes/QJQNuCdwbQjyzYEQkoR51746553373.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:none; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Abnormality</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Reason</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:none; border-top:none\">\n<p><strong>Bite cells </strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Michelle To and Valentin Villatoro\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://pressbooks.openeducationalberta.ca/mlsci/chapter/abnormal-rbc-morphology-bite-keratocyte-blister-helmet-cell/\" data-tags=\"\" height=\"175\" src=\"https://image.prepladder.com/content/vkVubf4pUuv23XMZZsiU1745495559.png\" width=\"200\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>G6PD deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<ul>\n<li>Oxidative stress leads to <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> of <span class=\"customMeta\" data-dictid=\"1a1b98a5d7169277719914104ae697\">sulfhydryl</span> groups in haemoglobin → Denaturation of haemoglobin → <strong>Heinz bodies.</strong></li>\n<li>RBCs with Heinz bodies pass through the <span class=\"customMeta\" data-dictid=\"6a4861c8d71692777199aeb1d55c85\">spleen</span> → Splenic macrophages try to pluck these Heinz bodies → <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">Membrane</span> loss → <strong>Bite cells</strong><strong>.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:none; border-top:none\">\n<p><strong>Target cells</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"By Dr Graham Beards\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Codocyte#/media/File:Target_cells_and_spherocytes.jpg\" data-tags=\"\" height=\"151\" src=\"https://image.prepladder.com/content/PkHpWZjcYoJgUJALRU4l1745495565.png\" width=\"200\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Thalassemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<ul>\n<li>↓ Haemoglobin content in RBCs → ↓ RBC volume → Surface area relatively unchanged → ↑ Surface area to volume ratio→ Altered <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> composition → ↑ Formation of <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> protrusions→ ↑ <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">Membrane</span> <span class=\"customMeta\" data-dictid=\"acb259200b16927771908888d1377c\">instability</span> → ↓ Hemoglobin accumulation in certain <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> areas → Central area with haemoglobin, clear zone, outer ring.</li>\n</ul>\n<ul>\n<li>Uneven distribution of haemoglobin and lipids → Characteristic \"bull's-eye\" appearance of <strong>Target cells</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:none; border-top:none\">\n<p><strong>Sickle-shaped RBC</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"S. ArunanS. Hariharan\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.semanticscholar.org/paper/Edge-Detection-of-Sickle-Cells-in-Red-Blood-Cells-Arunan-Hariharan/6809d2a77d118ba6bed38ac74b6ed1b9a975ea16/figure/0\" data-tags=\"\" height=\"133\" src=\"https://image.prepladder.com/content/N1PBFfQnHMeecvmIAQ4Q1745495572.png\" width=\"200\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Sickle Cell Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<p>Abnormal Hemoglobin (HbS) → HbS molecules <span class=\"customMeta\" data-dictid=\"8fb5d5a87a1692777196e95cd3c0dc\">polymerize</span> under low oxygen → RBCs become rigid and assume a <strong>sickle shape.</strong></p>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:none; border-top:none\">\n<p><strong>Spherocytes</strong></p>\n<figure class=\"caption_element\"><img alt=\"Spherocytes\" data-author=\"Paulo Henrique Orlandi Mourao\" data-hash=\"12281\" data-license=\"CC BY SA 3.0 \" data-source=\"https://en.wikipedia.org/wiki/Spherocytosis#/media/File:Hereditary_Spherocytosis_smear_2010-03-17.JPG\" data-tags=\"May2025\" height=\"153\" src=\"https://image.prepladder.com/notes/QJQNuCdwbQjyzYEQkoR51746553373.png\" width=\"200\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Hereditary Spherocytosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<p>Genetic <span class=\"customMeta\" data-dictid=\"359a8718a61692777185568ac80abb\">defect</span> in RBC <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> protein(spectrin) ⟶ Loss of <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> surface area ⟶ RBCs become <strong>spherical.</strong></p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old female with easy fatiguability and pallor presented to the OPD. The image of her hand is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Aplastic anemia", "correct": false}, {"label": "B", "text": "Vitamin B12 deficiency", "correct": false}, {"label": "C", "text": "Iron deficiency anaemia", "correct": true}, {"label": "D", "text": "Hypoalbuminemia", "correct": false}], "correct_answer": "C. Iron deficiency anaemia", "question_images": ["https://image.prepladder.com/content/MYpZXYWC20EsfT3Jw5tO1745495575.png"], "explanation_images": ["https://image.prepladder.com/content/ZyueDGHsDDc4HcxPc3BW1745495596.png", "https://image.prepladder.com/content/QizrAoliPCvYOSAXwKrA1745495596.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:633px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low (< 30 ng/mL) indicates depleted iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low levels are seen in iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased TIBC reflects the increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Red Cell Distribution <span class=\"customMeta\" data-dictid=\"1b0d31fe811692777202644090ba60\">Width</span> (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased RDW is often seen in iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> Aspiration and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Confirmatory test</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The JAK2 mutation is most commonly associated with:", "options": [{"label": "A", "text": "Polycythemia vera", "correct": true}, {"label": "B", "text": "Essential thrombocytosis", "correct": false}, {"label": "C", "text": "Chronic myelogenous leukemia (CML)", "correct": false}, {"label": "D", "text": "Primary myelofibrosis (PMF)", "correct": false}], "correct_answer": "A. Polycythemia vera", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What does the vacutainer tube depicted in the provided image contain?", "options": [{"label": "A", "text": "Na-EDTA", "correct": false}, {"label": "B", "text": "Trisodium citrate", "correct": false}, {"label": "C", "text": "NAF-heparin", "correct": false}, {"label": "D", "text": "Clot activator", "correct": true}], "correct_answer": "D. Clot activator", "question_images": ["https://image.prepladder.com/content/g1oKexkl64g4rGraKwsd1745495913.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:562px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Vacutainer Color</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Additive</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Purple/Lavender</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Na-EDTA <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Blue</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Trisodium <span class=\"customMeta\" data-dictid=\"3569209ba41692777184f88db9316d\">Citrate</span> <strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Green</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Heparin (NAF-heparin) <strong>(Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Red</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>No <span class=\"customMeta\" data-dictid=\"8fabe131a916927771802a448a329c\">additive</span> or <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">Clot</span> activator</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Yellow</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Acid <span class=\"customMeta\" data-dictid=\"3569209ba41692777184f88db9316d\">citrate</span> dextrose</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Gray</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Sodium fluoride, <span class=\"customMeta\" data-dictid=\"a995a613a016927771969d4395dc80\">Potassium</span> oxalate</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 52-year-old male patient comes with complaints of abdominal pain, nausea, and vomiting. A peripheral blood smear reveals macrocytes and hypersegmented neutrophils, and an endoscopy reveals atrophic gastritis. Which of the following conditions is likely to be seen in this patient?", "options": [{"label": "A", "text": "Vitamin B12 deficiency", "correct": true}, {"label": "B", "text": "Folate deficiency", "correct": false}, {"label": "C", "text": "Pyridoxine deficiency", "correct": false}, {"label": "D", "text": "Niacin deficiency", "correct": false}], "correct_answer": "A. Vitamin B12 deficiency", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/0lXZv2jfSk6HdXUDtvaX1746438643.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Reduced Dietary Intake</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Increased demand</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Impaired Absorption</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Vegetarian diet</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Pregnancy</li>\n<li>Lactation</li>\n<li>Growing child</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Pernicious <span class=\"customMeta\" data-dictid=\"53bee2a41216927771814d7ec3a67f\">anemia</span> (Option A)</li>\n<li>Infections- Diphyllobothrium latum (Option C)</li>\n<li>Gastrectomy (Option:D)</li>\n<li>Ileal disorders</li>\n<li>Malabsorption</li>\n<li>Ileal resection</li>\n<li>Diverticula of bowel</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Folic acid Deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Vitamin B12 Deficiency</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Site of <span class=\"customMeta\" data-dictid=\"c66705291e1692777203ed3498a606\">folate</span> <span class=\"customMeta\" data-dictid=\"5fcb9396d1169277718069dd7fa788\">absorption</span> - Jejunum</li>\n<li>Seen in: Alcoholics, pregnancy</li>\n<li>Causes <span class=\"customMeta\" data-dictid=\"b00388be25169277719369b3ab059f\">neural</span> tube defects</li>\n<li>Neurological symptoms are not seen</li>\n<li>Normal methylmalonic acid</li>\n<li>High homocysteine</li>\n<li>FIGLU test positive</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Site of <span class=\"customMeta\" data-dictid=\"c66705291e1692777203ed3498a606\">folate</span> <span class=\"customMeta\" data-dictid=\"5fcb9396d1169277718069dd7fa788\">absorption</span> - Ileum</li>\n<li>Seen in: Vegetarians, pregnancy, Diphyllobothrium latum infection</li>\n<li>Neurological manifestation: Subacute combined degeneration</li>\n<li>High methylmalonic acid</li>\n<li>High homocysteine</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 23-year-old male patient presented with a history of fatigue and tiredness. On investigation, he was found to have Hb = 9 g/dl and MCV = 101 FL. A peripheral smear examination showed macrocytic RBC and hypersegmented neutrophils. Which of the following is the most likely etiology?", "options": [{"label": "A", "text": "Lead poisoning", "correct": false}, {"label": "B", "text": "Iron deficiency anaemia", "correct": false}, {"label": "C", "text": "Hemolytic anemia", "correct": false}, {"label": "D", "text": "Chronic alcoholism", "correct": true}], "correct_answer": "D. Chronic alcoholism", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/okisknmyjPXiiueTcNnM1746517833.png"], "explanation": "<p>Correct Answer D - Chronic alcoh\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Folic acid Deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Vitamin B12 deficiency</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Site of <span class=\"customMeta\" data-dictid=\"c66705291e1692777203ed3498a606\">folate</span> <span class=\"customMeta\" data-dictid=\"5fcb9396d1169277718069dd7fa788\">absorption</span> - Jejunum</li>\n<li>Seen in: <strong>Alcoholics</strong>, pregnancy</li>\n<li>Causes <span class=\"customMeta\" data-dictid=\"b00388be25169277719369b3ab059f\">neural</span> tube defects</li>\n<li>Neurological symptoms are not seen</li>\n<li>Normal methylmalonic acid</li>\n<li>High homocysteine</li>\n<li>FIGLU test positive</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Site of <span class=\"customMeta\" data-dictid=\"c66705291e1692777203ed3498a606\">folate</span> <span class=\"customMeta\" data-dictid=\"5fcb9396d1169277718069dd7fa788\">absorption</span> - Ileum</li>\n<li>Seen in: Vegetarians, pregnancy, Diphyllobothrium latum infection</li>\n<li>Neurological manifestation: Subacute combined degeneration</li>\n<li>High methylmalonic acid</li>\n<li>High homocysteine</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 9-month-old boy presents with progressive pallor and abdominal distention. On investigations, hepatosplenomegaly and malar eminence are seen, and his peripheral blood smear is shown below. He has a low Hb; the Mentzer index is less than 13. What diagnosis would this signify for this patient?", "options": [{"label": "A", "text": "Megaloblastic anemia", "correct": false}, {"label": "B", "text": "Iron deficiency anaemia", "correct": false}, {"label": "C", "text": "Thalassemia", "correct": true}, {"label": "D", "text": "Pernicious anemia", "correct": false}], "correct_answer": "C. Thalassemia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Vpifn3csAFOtELnhV7nH1747116120.png", "https://image.prepladder.com/content/O5SrmNKUVmK7Ul4nOFSg1748155158.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:613px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Thalassemia Major (β-Thalassemia Major)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>A severe <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of β-thalassemia caused by homozygous or compound heterozygous mutations in the β-globin gene (HBB) on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 11, leading to absent or markedly <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> β-globin chain production.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Genetics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> disorder, caused by mutations in the β-globin gene leading to <span class=\"customMeta\" data-dictid=\"144d78fe4816927771852de984c62f\">defective</span> <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> synthesis.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pathophysiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Reduced or absent β-globin chains lead to <span class=\"customMeta\" data-dictid=\"7a1ae24f701692777187a7f60bbd9f\">excess</span> α-globin chains, which <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> unstable precipitates, causing ineffective erythropoiesis, hemolysis, and severe anaemia.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Symptoms appear around 6 months of age (as <span class=\"customMeta\" data-dictid=\"f375a3584316927772020efa386e3e\">fetal</span> haemoglobin declines); severe anaemia, growth retardation, hepatosplenomegaly, skeletal deformities (crew-cut appearance on skull X-ray, <span class=\"customMeta\" data-dictid=\"35aa36279d16927772031c7ce8d6e5\">frontal</span> bossing), jaundice, and delayed puberty.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hematological Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Peripheral smear</strong>: <span class=\"customMeta\" data-dictid=\"d09dc1da551692777192706b7f882e\">Microcytic</span> <span class=\"customMeta\" data-dictid=\"07ccd8f461169277718970a6f1a131\">hypochromic</span> anaemia, target cells, anisopoikilocytosis, <span class=\"customMeta\" data-dictid=\"a6f7ad44aa1692777193665a7f5d9a\">nucleated</span> RBCs.</li>\n<li><strong>Bone marrow</strong>: Erythroid <span class=\"customMeta\" data-dictid=\"4c5d5ef6c31692777189820d4b320d\">hyperplasia</span> with expansion of <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> cavities.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hemoglobin Electrophoresis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Absent or very low HbA, markedly increased HbF (>90%), variable HbA2.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Complications</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Iron overload</strong> (due to repeated transfusions leading to secondary hemochromatosis)</li>\n<li><strong>Cardiac failure</strong> (due to iron deposition)</li>\n<li>E<strong>ndocrinopathies</strong> (diabetes, hypothyroidism, hypogonadism)</li>\n<li><strong>Osteopenia/osteoporosis</strong></li>\n<li>I<strong>ncreased infection risk</strong> (especially from Yersinia and <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> infections).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Blood tests</strong> (CBC, <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> smear), <strong>Hb electrophoresis/HPLC</strong>, <strong>Serum ferritin</strong> (for iron overload), <strong>Genetic testing</strong> (HBB gene mutations), <strong>Prenatal diagnosis</strong> (chorionic <span class=\"customMeta\" data-dictid=\"b0bb7d5b6716927772028625a93e1e\">villus</span> <span class=\"customMeta\" data-dictid=\"521de62abe16927771989a90d0e9e8\">sampling</span> or amniocentesis).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Regular <strong>blood transfusions</strong>, <strong>iron <span class=\"customMeta\" data-dictid=\"11199cbd1816927771841f1eb35b86\">chelation</span> therapy</strong> (deferoxamine, deferasirox, deferiprone), <strong>splenectomy</strong> (in <span class=\"customMeta\" data-dictid=\"3790c638ab16927771970a0a41d3ab\">refractory</span> cases), and <strong>hematopoietic <span class=\"customMeta\" data-dictid=\"467c0b4fc016927771997e1043aeda\">stem cell transplantation</span> (HSCT)</strong> (only <span class=\"customMeta\" data-dictid=\"0968038e2a1692777185ed087c7fd8\">curative</span> option).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Prevention</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Carrier screening, genetic counselling, <span class=\"customMeta\" data-dictid=\"d554413593169277719693b8e38638\">prenatal</span> diagnosis, <span class=\"customMeta\" data-dictid=\"191d7c663a1692777196d6e0afdfb3\">preimplantation genetic diagnosis</span> (PGD) in high-risk couples.</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Feature</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Beta <span class=\"customMeta\" data-dictid=\"baed0c93841692777200be26c8b9d2\">Thalassemia</span> Minor</strong></p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Microcytic <span class=\"customMeta\" data-dictid=\"07ccd8f461169277718970a6f1a131\">hypochromic</span> anemia</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Microcytic <span class=\"customMeta\" data-dictid=\"07ccd8f461169277718970a6f1a131\">hypochromic</span> anemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>RBC</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Less</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>More</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>MCV</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Normal to low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>RDW(size variance)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>More</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mentzer index: MCV/RBC </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>>13</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><13</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Reticulocyte count</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Normal to slightly increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>HbA2 - confirmatory test </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><3.5%</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>>3.5%</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A young boy from high altitude came with fever and weakness and had the following reports- Hemoglobin 17 g%, TLC is 21,000 with neutrophils 25, lymphocytes 30, eosinophils 5, myelocytes and metamyelocytes 40 in peripheral smear. Next step in the investigation should be:", "options": [{"label": "A", "text": "Philadelphia chromosome", "correct": false}, {"label": "B", "text": "JAK mutation", "correct": false}, {"label": "C", "text": "Erythropoietin levels", "correct": true}, {"label": "D", "text": "Bone marrow biopsy with reticulin stain", "correct": false}], "correct_answer": "C. Erythropoietin levels", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true about hereditary spherocytosis?", "options": [{"label": "A", "text": "Gallstones develop by 4-5 years of age", "correct": false}, {"label": "B", "text": "Splenectomy does not protect against developing gallstones", "correct": false}, {"label": "C", "text": "At least 25% of cases have a family history of hereditary spherocytosis", "correct": true}, {"label": "D", "text": "High MCH is pathognomonic of HS", "correct": false}], "correct_answer": "C. At least 25% of cases have a family history of hereditary spherocytosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/iEcVJInwZqSAWRCAheCU1745400167.png", "https://image.prepladder.com/notes/29dNlF4GR29WRqojZ6OX1745400239.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All are hereditary causes of thrombosis except:", "options": [{"label": "A", "text": "PNH", "correct": true}, {"label": "B", "text": "Protein S deficiency", "correct": false}, {"label": "C", "text": "Antithrombin deficiency", "correct": false}, {"label": "D", "text": "Homocystinuria", "correct": false}], "correct_answer": "A. PNH", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statement is correct regarding Paroxysmal Nocturnal Hemoglobinuria?", "options": [{"label": "A", "text": "Sucrose lysis test is used for confirmation", "correct": false}, {"label": "B", "text": "Flow cytometry is the best investigation", "correct": true}, {"label": "C", "text": "Most common cause of death is heart failure", "correct": false}, {"label": "D", "text": "It is an inherited disorder", "correct": false}], "correct_answer": "B. Flow cytometry is the best investigation", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Flow <span class=\"customMeta\" data-dictid=\"551a62b1ec169277718587f847e627\">cytometry</span> is the best investig\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "How is transferrin saturation affected by iron deficiency anemia?", "options": [{"label": "A", "text": "Increased", "correct": false}, {"label": "B", "text": "Decreased", "correct": true}, {"label": "C", "text": "Normal", "correct": false}, {"label": "D", "text": "Dynamic", "correct": false}], "correct_answer": "B. Decreased", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B – D\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not seen after ileal resection?", "options": [{"label": "A", "text": "Nuclear cytological asynchrony", "correct": false}, {"label": "B", "text": "Neurological manifestations", "correct": false}, {"label": "C", "text": "Microcytic hypochromic anemia", "correct": true}, {"label": "D", "text": "Reversible dementia", "correct": false}], "correct_answer": "C. Microcytic hypochromic anemia", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"d09dc1da551692777192706b7f882e\">Microcytic</span> <span class=\"customMeta\" data-dictid=\"07ccd8f461169277718970a6f1a131\">hypochromic</span&g\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old female who is a known case of sickle cell anaemia was rushed to the emergency department with a complaint of extreme pain in the legs and fingers for the past 4 hours. Further examination revealed pain and tenderness in the right upper quadrant, and investigations showed sickle cells on peripheral blood smear and high bilirubin(indirect). What is the diagnosis?", "options": [{"label": "A", "text": "IDA", "correct": false}, {"label": "B", "text": "Thalassemia", "correct": false}, {"label": "C", "text": "Anaemia of chronic disease", "correct": false}, {"label": "D", "text": "Sickle cell crisis", "correct": true}], "correct_answer": "D. Sickle cell crisis", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/OhgQgFAXJHCCNTNEQZbh1747649370.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient reports to the outpatient department with complaints of fatigue. Investigation results indicate a Hb of 5.9, increased RDW and TIBC, and low ferritin. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Sideroblastic anemia", "correct": false}, {"label": "B", "text": "IDA", "correct": true}, {"label": "C", "text": "Anaemia of chronic disease", "correct": false}, {"label": "D", "text": "Hemolytic anemia", "correct": false}], "correct_answer": "B. IDA", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/BE83xQv7fE21Pgop6PZ11747303848.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:633px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low (< 30 ng/mL) (depleted iron stores).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low levels</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased TIBC (increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Red Cell Distribution <span class=\"customMeta\" data-dictid=\"1b0d31fe811692777202644090ba60\">Width</span> (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased RDW (Red Cell Distribution Width)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">Aspiration</span> and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Confirmatory test</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:599px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Serum Iron</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Transferrin saturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>TIBC</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Sideroblastic Anemia</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anaemia of Chronic Disease</strong></p>\n<p><strong>(Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hemolytic Anemia</strong></p>\n<p><strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient visits a haematologist with symptoms of weakness and fatigue. Laboratory tests show low haemoglobin, a low reticulocyte count, and normal WBC and platelet counts. The bone marrow analysis reveals a selective reduction in erythroid precursors. What is the likely diagnosis?", "options": [{"label": "A", "text": "Aplastic anemia", "correct": false}, {"label": "B", "text": "Pure red cell aplasia", "correct": true}, {"label": "C", "text": "Iron deficiency anaemia", "correct": false}, {"label": "D", "text": "Pernicious anemia", "correct": false}], "correct_answer": "B. Pure red cell aplasia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old patient presents with anaemia. Investigations show low serum iron and ferritin levels, along with increased TIBC. Which of the following is most likely to be present?", "options": [{"label": "A", "text": "Iron Deficiency Anemia (IDA)", "correct": true}, {"label": "B", "text": "Myelodysplastic Syndrome", "correct": false}, {"label": "C", "text": "Aplastic Anemia", "correct": false}, {"label": "D", "text": "Anaemia of Chronic Disease", "correct": false}], "correct_answer": "A. Iron Deficiency Anemia (IDA)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ZJHqMzVMKsxgMscGvUuK1747223300.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low (< 30 ng/mL) (depleted iron stores). <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low levels <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased TIBC (increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores). <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Red Cell Distribution Width (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased RDW</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">Aspiration</span> and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Confirmatory test</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microcytic (<80 fL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Normocytic (80-100 fL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macrocytic (>100 fL)</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia</li>\n<li>Thalassemia</li>\n<li>Sideroblastic anaemia</li>\n</ul>\n</td>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anaemia of chronic disease</li>\n<li>Hemolytic anaemia</li>\n<li>Acute blood loss</li>\n<li>Renal disease (↓ Erythropoietin)</li>\n</ul>\n</td>\n<td rowspan=\"4\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Liver dysfunction</li>\n<li>Hypothyroidism</li>\n<li>B12 and <span class=\"customMeta\" data-dictid=\"c66705291e1692777203ed3498a606\">folate</span> deficiency</li>\n<li>Cytotoxic drugs</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following cells are located in the centre of the lumen in a venule?", "options": [{"label": "A", "text": "Lymphocytes", "correct": false}, {"label": "B", "text": "RBCs", "correct": true}, {"label": "C", "text": "Neutrophils", "correct": false}, {"label": "D", "text": "Platelets", "correct": false}], "correct_answer": "B. RBCs", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old female who is a known case of sickle cell anaemia was rushed to the emergency department with a complaint of extreme pain in the legs and fingers for the past 4 hours. Further examination revealed pain and tenderness in the right upper quadrant, and investigations showed sickle cells on peripheral blood smear and high bilirubin(indirect). What is the diagnosis?", "options": [{"label": "A", "text": "IDA", "correct": false}, {"label": "B", "text": "Thalassemia", "correct": false}, {"label": "C", "text": "Anaemia of chronic disease", "correct": false}, {"label": "D", "text": "Sickle cell crisis", "correct": true}], "correct_answer": "D. Sickle cell crisis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/lyybY2TCthQ1gjbrbTzd1747377457.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient reports to the outpatient department with complaints of fatigue. Investigation results indicate a Hb of 5.9, increased RDW and TIBC, and low ferritin. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Sideroblastic anemia", "correct": false}, {"label": "B", "text": "IDA", "correct": true}, {"label": "C", "text": "Anaemia of chronic disease", "correct": false}, {"label": "D", "text": "Hemolytic anemia", "correct": false}], "correct_answer": "B. IDA", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/WSPNN1WTR9bugGJgXioL1747227561.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low (< 30 ng/mL) (depleted iron stores).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low levels</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased TIBC (increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Red Cell Distribution <span class=\"customMeta\" data-dictid=\"1b0d31fe811692777202644090ba60\">Width</span> (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased RDW (Red Cell Distribution Width)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">Aspiration</span> and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Confirmatory test</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Serum Iron</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Transferrin saturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>TIBC</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sideroblastic Anemia</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anaemia of Chronic Disease</strong></p>\n<p><strong>(Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemolytic Anemia</strong></p>\n<p><strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old female patient presents to the clinic with complaints of fatigue, weakness, and pale skin. On further investigation, her complete blood count reveals a microcytic anemia. What is the likely diagnosis for this patient?", "options": [{"label": "A", "text": "Alcoholism", "correct": false}, {"label": "B", "text": "Chronic Kidney disease", "correct": false}, {"label": "C", "text": "Hemolytic anemia", "correct": false}, {"label": "D", "text": "Iron deficiency anemia", "correct": true}], "correct_answer": "D. Iron deficiency anemia", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male patient with a history of chronic inflammatory conditions presents with fatigue, weakness, and pallor. Laboratory investigations reveal microcytic hypochromic anemia. Further evaluation suggests an underlying disorder affecting iron metabolism. Which cytokine is most likely inhibiting the activity of ferroportin in this patient?", "options": [{"label": "A", "text": "IL-1", "correct": false}, {"label": "B", "text": "IL-6", "correct": true}, {"label": "C", "text": "IFN-gamma", "correct": false}, {"label": "D", "text": "TNF-Alpha", "correct": false}], "correct_answer": "B. IL-6", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - IL-6\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Serum transferrin saturation level is low. What is the most likely condition?", "options": [{"label": "A", "text": "Iron Deficiency Anemia", "correct": true}, {"label": "B", "text": "Hemochromatosis", "correct": false}, {"label": "C", "text": "Sideroblastic anemia", "correct": false}, {"label": "D", "text": "Pernicious anemia", "correct": false}], "correct_answer": "A. Iron Deficiency Anemia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:601px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Investigations for IDA</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low (< 30 ng/mL) indicates depleted iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low levels are seen.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"8724f10741169277720096af709b1b\">TIBC</span> reflects the increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Transferrin saturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Is decreased, which refers to the percentage of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> that is <span class=\"customMeta\" data-dictid=\"d82fcb9d1f16927771836a9f6ccf14\">bound</span> to iron</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Red Cell Distribution <span class=\"customMeta\" data-dictid=\"1b0d31fe811692777202644090ba60\">Width</span> (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased RDW is often seen in iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">Aspiration</span> and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Confirmatory test</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:567px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Type of Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Serum Iron</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Transferrin saturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>TIBC</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Sideroblastic Anemia</strong></p>\n<p><strong>(Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hemochromatosis</strong></p>\n<p><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Investigations of a patient being evaluated for leukaemia revealed a WBC count of 450,000/μL, with eosinophilia and basophilia. What is the likely diagnosis in this case?", "options": [{"label": "A", "text": "Acute Lymphoblastic Leukemia (ALL)", "correct": false}, {"label": "B", "text": "Chronic Myelogenous Leukemia (CML)", "correct": true}, {"label": "C", "text": "Chronic Lymphocytic Leukemia (CLL)", "correct": false}, {"label": "D", "text": "Acute Myelogenous Leukemia (AML)", "correct": false}], "correct_answer": "B. Chronic Myelogenous Leukemia (CML)", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/MKSAQcVTx64nXZL9JCPI1745399239.png", "https://image.prepladder.com/notes/2UImniYlAfbk7UPS1ffi1745399271.png", "https://image.prepladder.com/notes/P5GtX8Zlrfvg1Bty001d1745399302.png", "https://image.prepladder.com/notes/26jfekwlZOEu0OJ7A2Dx1745399339.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:613px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<h3><strong>Chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> Leukemia (CML) </strong></h3>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Category</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genetics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Philadelphia <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> t(9;22)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myeloid lineage</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Etiopathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene</strong> from t(9;22)<strong> increases tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> activity, </strong>leading to uncontrolled <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> proliferation. Radiation exposure is a risk factor.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Affects adults.</li>\n<li>Presents with splenomegaly, fatigue, weight loss, night sweats, and <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> discomfort.</li>\n<li>It can progress to blast crisis, resembling <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> leukaemia.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> <span class=\"customMeta\" data-dictid=\"a246c8382816927771821a267ea486\">aspirate</span> to confirm.</li>\n<li>FISH detects the BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"a246c8382816927771821a267ea486\">aspirate</span> findings.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Presence of scattered macrophages with abundant wrinkled, green-blue cytoplasm, called sea-blue histiocytes or pseudo-Gaucher cells.</li>\n<li>The <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> is markedly <span class=\"customMeta\" data-dictid=\"99179151b4169277718946a0f60df6\">hypercellular</span> due to massively increased numbers of maturing <span class=\"customMeta\" data-dictid=\"f56da4c63c1692777188101e40d3ba\">granulocytic</span> precursors (elevated <strong>eosinophils and basophils</strong>)</li>\n<li>Increased megakaryocytes, commonly with small, <span class=\"customMeta\" data-dictid=\"fd29b16a0e1692777186324bd9a553\">dysplastic</span> forms called <span class=\"customMeta\" data-dictid=\"8f3ed9617d1692777186d5194ddc21\">dwarf</span> megakaryocytes.</li>\n<li>Normal or slightly decreased <span class=\"customMeta\" data-dictid=\"892718f3e916927771871389d2e1a3\">erythroid</span> progenitors (increased myeloid: <span class=\"customMeta\" data-dictid=\"892718f3e916927771871389d2e1a3\">erythroid</span> ratio).</li>\n<li>Increased deposition of <span class=\"customMeta\" data-dictid=\"059559ce5d16927771975852f6a8ed\">reticulin</span> fibres.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Management</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> inhibitors (TKIs) like <strong>Imatinib.</strong></p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"ALL\" data-author=\"VashiDonsk \" data-hash=\"11214\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Leukemia#/media/File:Acute_leukemia-ALL.jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/MKSAQcVTx64nXZL9JCPI1745399239.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Lymphoblastic Leukemia (ALL) </strong><strong>(Option A):</strong></p>\n<ul>\n<li><strong>Lymphoblasts in <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> >=20%</strong></li>\n<li><strong>Cytoplasmic vacuolations</strong></li>\n<li>They contain fat (Oil Red O Positive)</li>\n<li><strong>Hand mirror-shaped cells</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"AML\" data-author=\"Makysm\" data-hash=\"11215\" data-license=\"CC0\" data-source=\"https://en.wikipedia.org/wiki/Acute_myeloid_leukemia#/media/File:Acute_Myeloid_Leukemia_(M2_type).jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/2UImniYlAfbk7UPS1ffi1745399271.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> Leukemia (AML) </strong><strong>(Option D)</strong><strong>:</strong></p>\n<ul>\n<li>Blasts ≥ 20%</li>\n<li><strong>Myeloblasts with AuerRods </strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"CLL\" data-author=\"Oscier, David & Else, Monica & Matutes, Estela & Morilla, Ricardo & Strefford, Jonathan & Catovsky, Daniel\" data-hash=\"11216\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Morphological-appearances-of-chronic-lymphocytic-leukaemia-CLL-and-CLL-with-10_fig1_302032812\" data-tags=\"\" src=\"https://image.prepladder.com/notes/P5GtX8Zlrfvg1Bty001d1745399302.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic Lymphocytic Leukemia (CLL) </strong><strong>(Option C)</strong><strong>:</strong></p>\n<ul>\n<li><strong>Smudge cells</strong> (or parachute/basket cell): Due to the <span class=\"customMeta\" data-dictid=\"0f4e78e9121692777203594ba840cc\">fragility</span> of lymphocytes during slide preparation</li>\n<li><strong>Convent girl appearance</strong>: Lot of homogenous, small, mature-like, round lymphocytes with scant cytoplasm</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"CML\" data-author=\"Paulo Henrique Orlandi Mourao\" data-hash=\"11217\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Chronic_myelogenous_leukemia#/media/File:Chronic_Myeloid_Leukemia_smear_2009-04-09.JPG\" data-tags=\"\" src=\"https://image.prepladder.com/notes/26jfekwlZOEu0OJ7A2Dx1745399339.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> Leukemia (CML):</strong></p>\n<ul>\n<li>Leukocytosis</li>\n<li>Cell Types: Neutrophils( multilobed nucleus), metamyelocytes (indented nucleus), myelocytes (D-shaped nucleus), and <strong>eosinophils </strong>(orange cells)</li>\n<li><strong>College girl/garden party appearance</strong>: Due to the variety of cell appearances</li>\n<li><strong>Shift to the Left: </strong>Presence of <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> cell types, mainly <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> neutrophils, in the blood.</li>\n</ul>\n<br/>\n\t\t\t </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old woman presents with complaints of fatigue and dyspnea for 2 weeks. On examination, pallor is noted, and haemoglobin is found to be 6 gm/dL. What is the likely finding seen on the peripheral smear?", "options": [{"label": "A", "text": "Poikilocytes", "correct": false}, {"label": "B", "text": "Microcytic hypochromic cells", "correct": true}, {"label": "C", "text": "Macrocytic cells", "correct": false}, {"label": "D", "text": "Target cells", "correct": false}], "correct_answer": "B. Microcytic hypochromic cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/wHxCbYMha5oDVmbWbyV71745391042.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microcytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Normocytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macrocytic Anaemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>S</strong>ideroblastic anemia.</li>\n<li><strong>I</strong>ron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia.</li>\n<li><strong>T</strong>halassemia.</li>\n<li><strong>A</strong>naemia of chronic disease.</li>\n<li><strong>L</strong>ead poisoning.\n\t\t\t\t<ul>\n<li> </li>\n</ul>\n</li>\n<li><strong>(Mnemonic- SITAL)</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Acute Blood Loss</li>\n<li>Hemolytic Anaemia(hereditary spherocytosis)</li>\n<li>Anaemia of Chronic Disease</li>\n<li>Bone Marrow Disorders (e.g., Aplastic Anaemia)</li>\n<li>Renal Disease</li>\n<li>Endocrine Disorders (e.g., Hypothyroidism)</li>\n<li>Early stages of iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vitamin B12 Deficiency</li>\n<li>Folate Deficiency</li>\n<li>Alcohol Abuse</li>\n<li>Liver Disease</li>\n<li>Hypothyroidism</li>\n<li>Myelodysplastic Syndrome</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old woman presents with fatigue. Investigations reveal the following: Hemoglobin (Hb): 5 gm%, low mean corpuscular haemoglobin (MCH), and low mean corpuscular volume (MCV). The peripheral smear shows microcytic hypochromic red blood cells. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Megaloblastic anaemia", "correct": false}, {"label": "B", "text": "Iron deficiency anaemia", "correct": true}, {"label": "C", "text": "Thalassemia major", "correct": false}, {"label": "D", "text": "Essential thrombocytosis", "correct": false}], "correct_answer": "B. Iron deficiency anaemia", "question_images": ["https://image.prepladder.com/notes/wHxCbYMha5oDVmbWbyV71745391042.png"], "explanation_images": ["https://image.prepladder.com/notes/wHxCbYMha5oDVmbWbyV71745391042.png"], "explanation": "<p><strong>Educational Objective:</strong></p>\n<ul><li>➤ Learning Objective:</li><li>➤ Microcytic Anaemia Normocytic Anaemia Macrocytic Anaemia S ideroblastic anemia. I ron deficiency anaemia. T halassemia. A naemia of chronic disease. L ead poisoning. (Mnemonic- SITAL) Acute Blood Loss Hemolytic Anaemia(hereditary spherocytosis) Anaemia of Chronic Disease Bone Marrow Disorders (e.g., Aplastic Anaemia) Renal Disease Endocrine Disorders (e.g., Hypothyroidism) Early stages of iron deficiency anaemia Vitamin B12 Deficiency Folate Deficiency Alcohol Abuse Liver Disease Hypothyroidism Myelodysplastic Syndrome</li><li>➤ Microcytic Anaemia Normocytic Anaemia Macrocytic Anaemia</li><li>➤ Microcytic Anaemia</li><li>➤ Microcytic Anaemia</li><li>➤ Microcytic Anaemia</li><li>➤ Normocytic Anaemia</li><li>➤ Normocytic Anaemia</li><li>➤ Normocytic Anaemia</li><li>➤ Macrocytic Anaemia</li><li>➤ Macrocytic Anaemia</li><li>➤ Macrocytic Anaemia</li><li>➤ S ideroblastic anemia. I ron deficiency anaemia. T halassemia. A naemia of chronic disease. L ead poisoning. (Mnemonic- SITAL) Acute Blood Loss Hemolytic Anaemia(hereditary spherocytosis) Anaemia of Chronic Disease Bone Marrow Disorders (e.g., Aplastic Anaemia) Renal Disease Endocrine Disorders (e.g., Hypothyroidism) Early stages of iron deficiency anaemia Vitamin B12 Deficiency Folate Deficiency Alcohol Abuse Liver Disease Hypothyroidism Myelodysplastic Syndrome</li><li>➤ S ideroblastic anemia. I ron deficiency anaemia. T halassemia. A naemia of chronic disease. L ead poisoning. (Mnemonic- SITAL)</li><li>➤ S ideroblastic anemia. I ron deficiency anaemia. T halassemia. A naemia of chronic disease. L ead poisoning.</li><li>➤ S ideroblastic anemia.</li><li>➤ I ron deficiency anaemia.</li><li>➤ A naemia of chronic disease.</li><li>➤ L ead poisoning.</li><li>➤ (Mnemonic- SITAL)</li><li>➤ (Mnemonic- SITAL)</li><li>➤ Acute Blood Loss Hemolytic Anaemia(hereditary spherocytosis) Anaemia of Chronic Disease Bone Marrow Disorders (e.g., Aplastic Anaemia) Renal Disease Endocrine Disorders (e.g., Hypothyroidism) Early stages of iron deficiency anaemia</li><li>➤ Acute Blood Loss Hemolytic Anaemia(hereditary spherocytosis) Anaemia of Chronic Disease Bone Marrow Disorders (e.g., Aplastic Anaemia) Renal Disease Endocrine Disorders (e.g., Hypothyroidism) Early stages of iron deficiency anaemia</li><li>➤ Acute Blood Loss</li><li>➤ Hemolytic Anaemia(hereditary spherocytosis)</li><li>➤ Anaemia of Chronic Disease</li><li>➤ Bone Marrow Disorders (e.g., Aplastic Anaemia)</li><li>➤ Endocrine Disorders (e.g., Hypothyroidism)</li><li>➤ Early stages of iron deficiency anaemia</li><li>➤ Vitamin B12 Deficiency Folate Deficiency Alcohol Abuse Liver Disease Hypothyroidism Myelodysplastic Syndrome</li><li>➤ Vitamin B12 Deficiency Folate Deficiency Alcohol Abuse Liver Disease Hypothyroidism Myelodysplastic Syndrome</li><li>➤ Vitamin B12 Deficiency</li><li>➤ Folate Deficiency</li><li>➤ Myelodysplastic Syndrome</li></ul>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:633px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Iron Study</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Interpretation in Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Ferritin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low <strong>(< 30 ng/mL)</strong> indicates depleted iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Iron (Fe)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low levels are seen in iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Total Iron Binding Capacity (TIBC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased TIBC reflects the increased capacity of <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> to bind iron in response to low iron stores.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Red Cell Distribution <span class=\"customMeta\" data-dictid=\"1b0d31fe811692777202644090ba60\">Width</span> (RDW)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased RDW is often seen in iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone Marrow Aspiration and Iron Staining</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Confirmatory test</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microcytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Normocytic Anaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Macrocytic Anaemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>S</strong>ideroblastic anemia.</li>\n<li><strong>I</strong>ron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia.</li>\n<li><strong>T</strong>halassemia.</li>\n<li><strong>A</strong>naemia of chronic disease.</li>\n<li><strong>L</strong>ead poisoning.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>(Mnemonic- SITAL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Acute Blood Loss</li>\n<li>Hemolytic Anaemia(hereditary spherocytosis)</li>\n<li>Anaemia of Chronic Disease</li>\n<li>Bone Marrow Disorders (e.g., Aplastic Anaemia)</li>\n<li>Renal Disease</li>\n<li>Endocrine Disorders (e.g., Hypothyroidism)</li>\n<li>Early stages of iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anaemia</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vitamin B12 Deficiency</li>\n<li>Folate Deficiency</li>\n<li>Alcohol Abuse</li>\n<li>Liver Disease</li>\n<li>Hypothyroidism</li>\n<li>Myelodysplastic Syndrome</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following cell types with their associated malignancy: Cell Type Associated Malignancy 1. Popcorn cell a. Acute promyelocytic leukemia 2. Faggot cell b. Lymphocyte-predominant Hodgkin’s lymphoma 3. Cerebriform nuclei c. Burkitt lymphoma 4. Starry sky appearance d. Sezary syndrome", "options": [{"label": "A", "text": "1-b, 2-a, 3-d, 4-c", "correct": false}, {"label": "B", "text": "1-a, 2-d, 3-c, 4-b", "correct": false}, {"label": "C", "text": "1-b, 2-c, 3-a, 4-c", "correct": false}, {"label": "D", "text": "1-a, 2-b, 3-d, 4-c", "correct": false}], "correct_answer": "Unknown", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/x1EGx0dtnBgiiZufmhg91745390531.png", "https://image.prepladder.com/notes/q5AQAYzIsslzeJBtGas11745390616.png", "https://image.prepladder.com/notes/R2LWLyequFcMBtmZYS9j1745390740.png", "https://image.prepladder.com/notes/bl5W8ZwOByIPF8Br5JaR1745390858.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:618px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Cell Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Associated Malignancy</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Popcorn cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Lymphocyte-predominant Hodgkin’s lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Faggot cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Acute promyelocytic leukemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Cerebriform nuclei</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Sezary syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Starry sky appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Burkitt lymphoma</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Popcorn cells</strong></p>\n<figure class=\"caption_element\"><img alt=\"Popcorn cells\" data-author=\"Nephron \" data-hash=\"11153\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Nodular_lymphocyte_predominant_Hodgkin_lymphoma#/media/File:Popcorn_cell_in_nodular_lymphocyte_predominant_Hodgkin_lymphoma_-_very_high_mag_cropped.jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/x1EGx0dtnBgiiZufmhg91745390531.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cells with <strong>multiple infolded nuclear membranes, small nucleoli, fine chromatin,</strong> and abundant pale cytoplasm.</li>\n<li>Seen in Nodular lymphocyte-Predominant Hodgkin lymphoma.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:658px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute promyelocytic leukemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>t(15:17) - PML-RAR𝛼 fusion</li>\n<li>Blocks <span class=\"customMeta\" data-dictid=\"cb12d6781c16927771962b853d3946\">promyelocyte</span> → <span class=\"customMeta\" data-dictid=\"23b7c84dee1692777193cbdc4c453d\">myelocyte</span> transformation</li>\n<li>Bone marrow: Auer rods <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> criss-cross called faggot cell</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"Faggot cells\" data-author=\"The Armed Forces Institute of Pathology (AFIP)\" data-hash=\"11155\" data-license=\"Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:Faggot_cell_in_AML-M3.jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/q5AQAYzIsslzeJBtGas11745390616.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<ul>\n<li>Can cause DIC</li>\n<li>PAS+</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with fever, night sweats, and weight loss for 2 months. On examination, non-tender rubbery nodes are palpable in the supraclavicular and inguinal regions on both sides. A peripheral smear shows the presence of binucleated cells. Which of the following markers will be seen in this condition? CD15 CD30 CD19 CD3", "options": [{"label": "A", "text": "1, 2, 4", "correct": false}, {"label": "B", "text": "2, 3, 4", "correct": false}, {"label": "C", "text": "2, 3", "correct": false}, {"label": "D", "text": "1, 2", "correct": true}], "correct_answer": "D. 1, 2", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/xTtqtkoCkoaqlVYCkw2R1745400823.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:642px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hodgkin <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">Lymphoma</span> (HL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-Hodgkin <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">Lymphoma</span> (NHL)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age of presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bimodal distribution</strong> peaks in young adults (15-35 years) and older adults (over 55).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>It is more common in older adults</strong><strong> </strong>but can occur at any age.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Localisation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More often localised to a <strong>single <span class=\"customMeta\" data-dictid=\"01591f7f591692777182ef8aa2360c\">axial</span> group of nodes</strong> (cervical, mediastinal, para-aortic)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More frequent involvement of <strong>multiple <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> nodes.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pattern of Spread</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Orderly spread by<strong> contiguity.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non <span class=\"customMeta\" data-dictid=\"2a2420d6bc1692777185ac0cb7e93d\">Contiguous</span> </strong>spread</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Involvement of Mesenteric Nodes and Waldeyer Ring</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mesenteric nodes and Waldeyer ring</strong> are rarely involved.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Waldeyer ring and mesenteric nodes are commonly involved.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extranodal Presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extranodal presentation is rare.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extranodal presentation is common.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following for Sickle cell anaemia is correct?", "options": [{"label": "A", "text": "Low mechanical fragility, high osmotic fragility", "correct": false}, {"label": "B", "text": "High mechanical fragility, high osmotic fragility", "correct": false}, {"label": "C", "text": "Low mechanical fragility, low osmotic fragility", "correct": false}, {"label": "D", "text": "High mechanical fragility, low osmotic fragility", "correct": true}], "correct_answer": "D. High mechanical fragility, low osmotic fragility", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a feature of hemolytic anaemia?", "options": [{"label": "A", "text": "Increased haptoglobin", "correct": false}, {"label": "B", "text": "Neutropenia", "correct": false}, {"label": "C", "text": "Reticulocytopenia", "correct": false}, {"label": "D", "text": "Decreased haptoglobin", "correct": true}], "correct_answer": "D. Decreased haptoglobin", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/ATt4v0tUvFNxpaTGuekM1747379235.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child presents with intermittent jaundice and splenomegaly. There is a history of similar complaints in the elder brother. A peripheral smear shows the following findings. Which of the following is the most appropriate diagnostic test for this condition?", "options": [{"label": "A", "text": "Osmotic fragility test - Hereditary spherocytosis", "correct": true}, {"label": "B", "text": "Coombs test - Autoimmune hemolytic anaemia", "correct": false}, {"label": "C", "text": "Genetic testing - G6PD deficiency", "correct": false}, {"label": "D", "text": "Flow cytometry - Paroxysmal nocturnal hemoglobinuria", "correct": false}], "correct_answer": "A. Osmotic fragility test - Hereditary spherocytosis", "question_images": ["https://image.prepladder.com/content/3fNAfCZpf8Ez8JhQKZ2H1745313411.png"], "explanation_images": ["https://image.prepladder.com/content/6icA1Y47wSZeEkq3qvH21745313493.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\">Mutations of <strong>ankyrin, band 3, spectrin, or band 4.2</strong></p>\n<p style=\"text-align:center\">↓</p>\n<p style=\"text-align:center\">Unstable RBC <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> with <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> loss</p>\n<p style=\"text-align:center\">↓</p>\n<p style=\"text-align:center\">The surface: volume ratio is reduced</p>\n<p style=\"text-align:center\">↓</p>\n<p style=\"text-align:center\">RBC takes up the shape of a sphere to compensate</p>\n<p style=\"text-align:center\">↓</p>\n<p style=\"text-align:center\">Spherical RBCs are trapped in splenic sinusoids due to large size</p>\n<p style=\"text-align:center\">↓</p>\n<p style=\"text-align:center\">Extravascular hemolysis</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Hepcidin inhibits iron transfer from the enterocyte to the plasma by binding to:", "options": [{"label": "A", "text": "Ferroportin", "correct": true}, {"label": "B", "text": "Transferrin", "correct": false}, {"label": "C", "text": "Divalent metal transporter-1 (DMT-1)", "correct": false}, {"label": "D", "text": "Ferritin", "correct": false}], "correct_answer": "A. Ferroportin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - F\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Choose the correct option regarding the storage temperature of blood components.", "options": [{"label": "A", "text": "RBC = 20-22ºC, Platelet = 2-6ºC, FFP = 18ºC", "correct": false}, {"label": "B", "text": "RBC = 2-6ºC, Platelet = 20-24ºC, FFP = -18ºC", "correct": true}, {"label": "C", "text": "RBC = 30ºC, FFP = 2-6ºC Platelet = 20-22ºC", "correct": false}, {"label": "D", "text": "RBC = 20-22ºC, FFP = Below -30ºC, Platelet = 2-6ºC", "correct": false}], "correct_answer": "B. RBC = 2-6ºC, Platelet = 20-24ºC, FFP = -18ºC", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> = 2-6ºC, <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">Platelet</span> = 20-24ºC, FFP = -18ºC\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is correct regarding transfusion of the blood received from the blood bank?", "options": [{"label": "A", "text": "It should be started within 4 hours of receiving it from the blood bank", "correct": false}, {"label": "B", "text": "It should be completed within 4 hours of receiving it from the blood bank", "correct": true}, {"label": "C", "text": "No such time restraint and can be done anytime", "correct": false}, {"label": "D", "text": "It should be completed within 6 hours of receiving it from the blood bank", "correct": false}], "correct_answer": "B. It should be completed within 4 hours of receiving it from the blood bank", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - It should be completed within 4 hours of receiving it from the blood bank\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In iron deficiency anemia, all of the following are reduced , except :", "options": [{"label": "A", "text": "Total iron binding capacity", "correct": true}, {"label": "B", "text": "Percentage saturation of transferrin", "correct": false}, {"label": "C", "text": "Hemoglobin level", "correct": false}, {"label": "D", "text": "Serum ferritin", "correct": false}], "correct_answer": "A. Total iron binding capacity", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Total iron binding capacity:</p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"text-align:center\"><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></td>\n</tr>\n<tr>\n<td>Serum iron</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Total iron binding capacity</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Transferrin saturation</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Serum ferritin</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Soluble <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptor</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Serum <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> protoporphyrin</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n</tbody>\n\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"text-align:center\"><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></td>\n</tr>\n<tr>\n<td>Serum iron</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Total iron binding capacity</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Transferrin saturation</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Serum ferritin</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Soluble <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptor</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Serum <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> protoporphyrin</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "CD-59 is involved in:", "options": [{"label": "A", "text": "Paroxysmal nocturnal hemoglobinuria", "correct": true}, {"label": "B", "text": "Chediak-Higashi syndrome", "correct": false}, {"label": "C", "text": "Essential thrombocythemia", "correct": false}, {"label": "D", "text": "Primary myelofibrosis", "correct": false}], "correct_answer": "A. Paroxysmal nocturnal hemoglobinuria", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"cd15fe58221692777194fbb9eec8d1\">Paroxysmal</span> <span class=\"customMeta\" data-dictid=\"d51601f2c41692777193ddfa55d163\">Nocturnal</span> Hemoglobinu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the diagnosis for an individual whose serum alkaline phosphatase is normal, PTH is normal, and vitamin D3 is normal with elevated serum calcium ?", "options": [{"label": "A", "text": "Vitamin D intoxication", "correct": false}, {"label": "B", "text": "Hyperparathyroidism", "correct": false}, {"label": "C", "text": "Multiple myeloma", "correct": true}, {"label": "D", "text": "Nutritional rickets", "correct": false}], "correct_answer": "C. Multiple myeloma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Multiple M\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td> </td>\n<td style=\"text-align:center\"><strong>Serum <span class=\"customMeta\" data-dictid=\"5eff25235516927771968c590529d7\">PTH</span> levels</strong></td>\n<td style=\"text-align:center\"><strong>Serum <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> levels</strong></td>\n<td> </td>\n</tr>\n<tr>\n<td><strong>Primary Hyperparathyroidism</strong></td>\n<td style=\"text-align:center\">↑/N</td>\n<td style=\"text-align:center\">↑</td>\n<td>Low phosphate</td>\n</tr>\n<tr>\n<td><strong>Secondary Hyperparathyroidism</strong></td>\n<td style=\"text-align:center\">↑</td>\n<td style=\"text-align:center\">↓/N</td>\n<td>CKD</td>\n</tr>\n<tr>\n<td><strong>Tertiary Hyperparathyroidism</strong></td>\n<td style=\"text-align:center\">↑</td>\n<td style=\"text-align:center\">↑</td>\n<td>High phosphate + CKD</td>\n</tr>\n<tr>\n<td><strong>Vitamin D deficiency</strong></td>\n<td style=\"text-align:center\">↑/N</td>\n<td style=\"text-align:center\">↓/N</td>\n<td> </td>\n</tr>\n<tr>\n<td><strong>Vitamin D excess</strong></td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↑</td>\n<td> </td>\n</tr>\n<tr>\n<td><strong>Pseudohypoparathyroidism</strong></td>\n<td style=\"text-align:center\">↑</td>\n<td style=\"text-align:center\">↓</td>\n<td>High phosphate</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following factors hinders the absorption of iron?", "options": [{"label": "A", "text": "Vitamin C", "correct": false}, {"label": "B", "text": "Phytates", "correct": true}, {"label": "C", "text": "Oxalate", "correct": false}, {"label": "D", "text": "Myoglobin", "correct": false}], "correct_answer": "B. Phytates", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Ph\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most sensitive indicator for iron deficiency anaemia?", "options": [{"label": "A", "text": "Serum ferritin", "correct": true}, {"label": "B", "text": "TIBC", "correct": false}, {"label": "C", "text": "Percentage saturation of transferrin", "correct": false}, {"label": "D", "text": "Bone marrow iron", "correct": false}], "correct_answer": "A. Serum ferritin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">Serum</span> F\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"text-align:center\"><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></td>\n</tr>\n<tr>\n<td>Serum iron</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Total iron binding capacity</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Transferrin saturation</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Serum ferritin</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Soluble <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptor</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Serum <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> protoporphyrin</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is correct about anaemia of chronic disease?", "options": [{"label": "A", "text": "High ferritin", "correct": true}, {"label": "B", "text": "Increased percentage of saturation of transferrin", "correct": false}, {"label": "C", "text": "Increased total iron binding capacity", "correct": false}, {"label": "D", "text": "High serum iron", "correct": false}], "correct_answer": "A. High ferritin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - High Ferritin:</p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td> </td>\n<td style=\"text-align:center\"><strong>Anemia of Chronic disease</strong></td>\n</tr>\n<tr>\n<td><strong>Serum iron</strong></td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td><strong>Transferrin saturation</strong></td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td><strong>Ferritin</strong></td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td><strong>Total iron binding capacity</strong></td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n</tbody>\n\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td> </td>\n<td style=\"text-align:center\"><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anemia</strong></td>\n<td style=\"text-align:center\"><strong>Anemia of chronic disease</strong></td>\n<td style=\"text-align:center\"><strong>Sideroblastic anemia</strong></td>\n</tr>\n<tr>\n<td><strong>Serum iron</strong></td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td><strong>Transferrin saturation</strong></td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td><strong>Ferritin</strong></td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↑</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td><strong>Total iron binding capacity</strong></td>\n<td style=\"text-align:center\">↑</td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old male presented to OPD with complaints of itching during baths . His hemoglobin was 20%, his platelet count was 89000/mL, and his WBC count was 30,000/mL. What is the most likely diagnosis ?", "options": [{"label": "A", "text": "Primary myelofibrosis", "correct": false}, {"label": "B", "text": "Chronic myeloid leukemia", "correct": false}, {"label": "C", "text": "Polycythemia vera", "correct": true}, {"label": "D", "text": "Essential thrombocytosis", "correct": false}], "correct_answer": "C. Polycythemia vera", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"7fd466a9c016927771962d5b061b0f\">Polycythemia</span> V\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding the use of the instrument given in the image below?", "options": [{"label": "A", "text": "Contraindicated if coagulopathy", "correct": true}, {"label": "B", "text": "Breath holding is required", "correct": false}, {"label": "C", "text": "Procedure cannot be done in both lateral and prone positions", "correct": false}, {"label": "D", "text": "Diagnosing an infiltrate or granulomatous disease", "correct": false}], "correct_answer": "A. Contraindicated if coagulopathy", "question_images": ["https://image.prepladder.com/content/UoHbpiRhdEEFrGfTYsdf1695203672.png"], "explanation_images": ["https://image.prepladder.com/content/UoHbpiRhdEEFrGfTYsdf1695203672.png"], "explanation": "<p>Correct Option A - Contraindicated if coagulopathy:</p>\n<p><strong>References:</strong></p>\n<ul><li>↳ A bone marrow biopsy can be performed with the patient in either a lateral or prone position.</li><li>↳ The choice of position depends on the preference of the physician and patient comfort.</li><li>↳ Option D - Diagnosing an infiltrate or granulomatous disease:</li><li>↳ Option D - Diagnosing an infiltrate or granulomatous disease:</li><li>↳ A bone marrow biopsy is a diagnostic procedure used to evaluate various conditions, including hematologic disorders, metastatic cancer, infections, and bone marrow failure syndromes. While an infiltrate or granulomatous disease may be detected through a bone marrow biopsy, it is not specific to this procedure alone.</li><li>↳ A bone marrow biopsy is a diagnostic procedure used to evaluate various conditions, including hematologic disorders, metastatic cancer, infections, and bone marrow failure syndromes.</li><li>↳ While an infiltrate or granulomatous disease may be detected through a bone marrow biopsy, it is not specific to this procedure alone.</li></u\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which transporter is required for the transport of iron into the enterocyte?", "options": [{"label": "A", "text": "Ferroportin", "correct": false}, {"label": "B", "text": "Divalent metal transporter-1", "correct": true}, {"label": "C", "text": "Divalent metal transporter-2", "correct": false}, {"label": "D", "text": "Haptocorrin", "correct": false}], "correct_answer": "B. Divalent metal transporter-1", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"9c9c29820b169277718670a8b16a3b\">Divalent</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following are features of iron deficiency anaemia?", "options": [{"label": "A", "text": "TIBC increased, ferritin decreased, transferrin saturation increased", "correct": false}, {"label": "B", "text": "TIBC increased, soluble transferrin receptor decreased, ferritin increased", "correct": false}, {"label": "C", "text": "TIBC increased, transferrin saturation decreased, ferritin decreased", "correct": true}, {"label": "D", "text": "TIBC increased, transferrin saturation decreased, ferritin increased", "correct": false}], "correct_answer": "C. TIBC increased, transferrin saturation decreased, ferritin decreased", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - TIBC increased, <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> <span class=\"customMeta\" data-dictid=\"e4696a0f8d169277719865588e55c7\">saturation</span> decreased, <span class=\"customMeta\" data-dictid=\"91d0e4c6fa16927772025f96b44b27\">ferritin</span> decreased:</p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"text-align:center\"><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></td>\n</tr>\n<tr>\n<td>Serum iron</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Total iron binding capacity</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Transferrin saturation</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Serum ferritin</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Soluble <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptor</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Serum <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> protoporphyrin</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n</tbody>\n\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"text-align:center\"><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> Anemia</strong></td>\n</tr>\n<tr>\n<td>Serum iron</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Total iron binding capacity</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Transferrin saturation</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Serum ferritin</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n<tr>\n<td>Soluble <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> receptor</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td>Serum <span class=\"customMeta\" data-dictid=\"8790b4667016927771979066e8958c\">RBC</span> protoporphyrin</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not routinely screened before conducting a blood transfusion?", "options": [{"label": "A", "text": "Hepatitis A", "correct": true}, {"label": "B", "text": "Hepatitis B", "correct": false}, {"label": "C", "text": "Hepatitis C", "correct": false}, {"label": "D", "text": "HIV 1 / HIV 2", "correct": false}], "correct_answer": "A. Hepatitis A", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"39867f177b16927771888cf43850d5\">Hepatitis</span> A\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child visited the hospital with her mother with complaints of severe fatigue, lethargy, pallor, and irritation. She has a known case of iron deficiency anemia and is on oral iron supplements. On reviewing the child, the physician in charge plans to start IV iron supplementation. What is the next best test to be done in assessing this child?", "options": [{"label": "A", "text": "Blood hemoglobin", "correct": false}, {"label": "B", "text": "Total iron binding capacity", "correct": false}, {"label": "C", "text": "Serum ferritin", "correct": true}, {"label": "D", "text": "Hematocrit", "correct": false}], "correct_answer": "C. Serum ferritin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">Serum</span&g\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td> </td>\n<td style=\"text-align:center\"><strong>Iron <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> anemia</strong></td>\n<td style=\"text-align:center\"><strong>Anemia of chronic disease</strong></td>\n<td style=\"text-align:center\"><strong>Sideroblastic anemia</strong></td>\n</tr>\n<tr>\n<td><strong>Serum iron</strong></td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td><strong>Transferrin saturation</strong></td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td><strong>Ferritin</strong></td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↑</td>\n<td style=\"text-align:center\">↑</td>\n</tr>\n<tr>\n<td><strong>Total iron binding capacity</strong></td>\n<td style=\"text-align:center\">↑</td>\n<td style=\"text-align:center\">↓</td>\n<td style=\"text-align:center\">↓</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following stains is used for the detection of hemosiderin deposits?", "options": [{"label": "A", "text": "Mason-Fontana stain", "correct": false}, {"label": "B", "text": "Oil Red O", "correct": false}, {"label": "C", "text": "Sudan black", "correct": false}, {"label": "D", "text": "Perls Prussian blue", "correct": true}], "correct_answer": "D. Perls Prussian blue", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Perls Prussian Blu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In which of the following conditions is macrocytic anemia seen?", "options": [{"label": "A", "text": "Thalassemia", "correct": false}, {"label": "B", "text": "Anemia of chronic disease", "correct": false}, {"label": "C", "text": "Sideroblastic anemia", "correct": false}, {"label": "D", "text": "Liver disease", "correct": true}], "correct_answer": "D. Liver disease", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Liv\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 77 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "As per FAB classification, what percentage of blast cells in bone marrow biopsy is required to diagnose a patient with acute leukaemia?", "options": [{"label": "A", "text": "10", "correct": false}, {"label": "B", "text": "20", "correct": false}, {"label": "C", "text": "25", "correct": false}, {"label": "D", "text": "30", "correct": true}], "correct_answer": "D. 30", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:623px\">\n<tbody>\n<tr>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>WHO classification</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>FAB (French-American-British) classification</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Basis of classification</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It incorporates genetics, immunophenotypic, and <span class=\"customMeta\" data-dictid=\"55beab619216927771925caac38373\">morphological</span> features.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is primarily based on <span class=\"customMeta\" data-dictid=\"2dcf62bc831692777192e737f2c4b0\">morphology</span> and cytochemistry</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Subtypes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>B-cell ALL, NOS (not otherwise specified).</li>\n<li>B-cell ALL with <span class=\"customMeta\" data-dictid=\"c64e3a661b1692777197afc2ff7bca\">recurrent</span> genetic abnormalities.</li>\n<li>T-cell ALL.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:257px\">\n<ul>\n<li>ALL-L1- small uniform cells</li>\n<li>ALL-L2- large cells with <span class=\"customMeta\" data-dictid=\"863f5457381692777190f05632a8b2\">irregular</span> nuclei</li>\n<li>ALL-L3- large cells with regular nuclei</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prognostic information</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It provides <span class=\"customMeta\" data-dictid=\"cfb6c738351692777196f69788a66e\">prognostic</span> information based on genetic abnormalities.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Limited <span class=\"customMeta\" data-dictid=\"cfb6c738351692777196f69788a66e\">prognostic</span> information and focused on morphology.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinical utility</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Used for diagnosis, treatment, and prognostication.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less commonly used in clinical practice and more historical.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnosis threshold</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>20% blasts in the bone marrow.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>30% blasts in the bone marrow.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which is not included in the FAB classification of acute lymphoblastic leukaemia (ALL) L3 subtype?", "options": [{"label": "A", "text": "Presence of lymphoblasts with vacuoles and cytoplasmic blebs", "correct": false}, {"label": "B", "text": "Expression of surface immunoglobulins", "correct": true}, {"label": "C", "text": "Association with Epstein-Barr virus (EBV)", "correct": false}, {"label": "D", "text": "t(9;22) Philadelphia chromosome", "correct": false}], "correct_answer": "B. Expression of surface immunoglobulins", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/PpgVFcLICyeyqYoTBHIo1737017187.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:649px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>L1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>L2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>L3</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurrence</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More common</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less common</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Morphology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small <span class=\"customMeta\" data-dictid=\"0780d98cec1692777189247c5a9456\">homogenous</span> blasts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large <span class=\"customMeta\" data-dictid=\"b2dafdf91e16927771884f1d4b5107\">heterogenous</span> blasts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large <span class=\"customMeta\" data-dictid=\"0780d98cec1692777189247c5a9456\">homogenous</span> blasts</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytoplasm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Scant blue</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Moderately weak basophilic</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Abundant <span class=\"customMeta\" data-dictid=\"0bc69d6cf8169277718209818c7522\">basophilic</span> with prominent vacuoles</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nucleus</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Regular</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Irregular nuclear outlines</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nucleoli</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small & indistinct</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prominent</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chromatin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Coarse & dark purple</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pink</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prognosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Best</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>-</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Poor</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not associated with acute lymphoblastic leukaemia (ALL) regarding chromosomes?", "options": [{"label": "A", "text": "t(9;22)", "correct": false}, {"label": "B", "text": "t(12;21)", "correct": false}, {"label": "C", "text": "t(1;19)", "correct": false}, {"label": "D", "text": "t(15;17)", "correct": true}], "correct_answer": "D. t(15;17)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 4-year-old male presents with fever, bleeding gums, and fatigue for 5 days. CBC shows Hb of 8g%, TLC 30,000/µL, and platelet count of 40,000/µL. A differential count shows an increased number of immature white blood cells. A bone marrow aspiration is done, as shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Chronic myeloid leukaemia.", "correct": false}, {"label": "B", "text": "Acute lymphoblastic leukaemia.", "correct": true}, {"label": "C", "text": "Acute promyelocytic leukaemia.", "correct": false}, {"label": "D", "text": "Aplastic anaemia", "correct": false}], "correct_answer": "B. Acute lymphoblastic leukaemia.", "question_images": ["https://image.prepladder.com/content/WEprQAjLML3zvOgvwJSH1737017453.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Symptoms </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Due to decline in normal <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> function.</li>\n<li>Fatigue - anaemia.</li>\n<li>Infections - neutropenia.</li>\n<li>Bleeding - thrombocytopenia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mass effects </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Bone pain due to <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> expansion and <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of the subperiosteum.</li>\n<li>Generalised lymphadenopathy.</li>\n<li>Hepatosplenomegaly.</li>\n<li>Testicular enlargement.</li>\n<li>Mediastinal mass in T-ALL (Superior <span class=\"customMeta\" data-dictid=\"1014e4cf5e169277719246e0ca91df\">mediastinal</span> syndrome).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CNS manifestations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Headache.</li>\n<li>Vomiting.</li>\n<li>Nerve palsies.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following markers will be negative on immunophenotyping of a patient with early pre-B acute leukaemia?", "options": [{"label": "A", "text": "TdT", "correct": false}, {"label": "B", "text": "DR", "correct": false}, {"label": "C", "text": "CD19", "correct": false}, {"label": "D", "text": "CD10", "correct": true}], "correct_answer": "D. CD10", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Type of ALL</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Immunophenotype</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Early Pre-B ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TdT, DR, CD19, CD24 </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pre-B ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TdT, DR, CD10, CD19, CD20, CD24, Cy Ig</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Common ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD19+, CD10+/CALLA+</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mature B ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DR, CD19 CD20, CD24, Surface Ig</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pro-T ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD3, CD7 </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pre-T ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TdT, CD2, CD3, CD4, CD5, CD7, CD8, CD34</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mature T ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD2, CD7, TdT</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is incorrect regarding the prognosis of ALL? Adults have a worse prognosis as compared to children aged 2-9 years. White females have a good survival rate as compared to black males. The Philadelphia chromosome (t(9;22)) is associated with a favourable prognosis. Higher white blood cell counts at diagnosis are associated with a better prognosis. Hypodiploidy in B-ALL is associated with a better prognosis.", "options": [{"label": "A", "text": "3, 4 and 5", "correct": true}, {"label": "B", "text": "2, 3 and 4", "correct": false}, {"label": "C", "text": "1, 4 and 5", "correct": false}, {"label": "D", "text": "4 and 5", "correct": false}], "correct_answer": "A. 3, 4 and 5", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:628px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\"><strong>Determinants</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\"><strong>Favourable</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\"><strong>Unfavourable</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">WBC/µL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\"><10,000</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">>1,00,000 <strong>(Statement D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Age</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">2-9 years</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\"><1 year, >10 years <strong>(Statement A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Gender</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">Female</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">Male</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Ethnicity</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">White <strong>(Statement B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">Black</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Lymph node, liver, <span class=\"customMeta\" data-dictid=\"6a4861c8d71692777199aeb1d55c85\">spleen</span> enlargement</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">Present</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Testicular enlargement</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">Present</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">CNS involvement</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">Present</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">FAB morphologic features</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">L1, early pre-B cell ALL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">L3, Pre-B cell & <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> B-cell ALL</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Ploidy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">Hyperdiploidy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">Hypodiploidy <strong>(Statement E)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Cytogenetic markers</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\">Trisomy 4, 10, 17, t(12;21)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">t(9;22), t(4;11) <strong>(Statement C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:201px\">\n<p style=\"text-align:center\">Remission states</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:188px\">\n<p style=\"text-align:center\"><14 days</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:239px\">\n<p style=\"text-align:center\">>14 days</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 7-year-old boy presents with fever, fatigue, and bone pain. On physical examination, there is notable hepatosplenomegaly and testicular enlargement. Laboratory findings show elevated white blood cell count and blasts on peripheral smear. Immunophenotyping reveals the presence of markers CD3, CD5, and CD10. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute Myeloid Leukemia (AML)", "correct": false}, {"label": "B", "text": "T cell Acute Lymphoblastic Leukemia", "correct": true}, {"label": "C", "text": "B cell Acute Lymphoblastic Leukemia", "correct": false}, {"label": "D", "text": "Chronic Lymphocytic Leukemia (CLL)", "correct": false}], "correct_answer": "B. T cell Acute Lymphoblastic Leukemia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:680px\">\n<tbody>\n<tr>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top; width:96px\"> </td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\"><strong>ALL</strong><br/>\n\t\t\t </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\"><strong>AML</strong></p>\n<p style=\"text-align:center\"><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\"><strong>CML</strong></p>\n<p style=\"text-align:center\"><strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top; width:96px\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\"><strong>B cell -ALL</strong></p>\n<p style=\"text-align:center\"><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\"><strong>T cell -ALL</strong></p>\n<p style=\"text-align:center\"><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top; width:165px\"> </td>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top; width:145px\"> </td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid; border-width:1px; text-align:center; vertical-align:top; width:96px\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\">Most common</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\">Less common (15%)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\">M2 (M/C)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:145px\">\n<p style=\"text-align:center\">- </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:96px\">\n<p style=\"text-align:center\">Age</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\">Children</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\">Teenagers</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\">Adults (15-40 years)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:145px\">\n<p style=\"text-align:center\">Middle-Elderly</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:96px\">\n<p style=\"text-align:center\">Mutation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\">Loss of function PAX5, E2A, EBF</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\">Gain of function NOTCH1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\">t(15:17) in M3,<br/>\n\t\t\tt (8:21) in M2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:145px\">\n<p style=\"text-align:center\">t(9:22) BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene. </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:96px\">\n<p style=\"text-align:center\">Prognosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\">Good</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\">Poor</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\">Good </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:145px\">\n<p style=\"text-align:center\">Good</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:96px\">\n<p style=\"text-align:center\">Organ<br/>\n\t\t\tInvolvement</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\">No tissue involvement</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\">CNS, Mediastinum, Testes, Bone pain</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\">Hepatosplenomegaly, <span class=\"customMeta\" data-dictid=\"09980563461692777188b0de904031\">gum</span> hyperplasia, chloroma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:145px\">\n<p style=\"text-align:center\">Massive splenomegaly, hepatomegaly</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:96px\">\n<p style=\"text-align:center\">Stain</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\">PAS+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\">Acid Phosphatase</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\">MPO+, NSE +</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:145px\">\n<p style=\"text-align:center\">Decreased NAP/LAP score</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:96px\">\n<p style=\"text-align:center\">Markers</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:124px\">\n<p style=\"text-align:center\">CD 19,20,21</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:150px\">\n<p style=\"text-align:center\">CD 1,2,<strong>3</strong>,<strong>5</strong>,7,<strong>10 (CALLA antigen)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:165px\">\n<p style=\"text-align:center\">CD 13, 33, and 117</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:145px\">\n<p style=\"text-align:center\">CD 25</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding the M4 subtype of AML based on FAB classification is true?", "options": [{"label": "A", "text": "It is associated with t(8:21), called AML with maturation.", "correct": false}, {"label": "B", "text": "It is associated with t(15:17), called acute promyelocytic leukaemia", "correct": false}, {"label": "C", "text": "It is associated with CBF-MYH fusion, called acute myelomonocytic leukaemia", "correct": true}, {"label": "D", "text": "It is associated with MPO positivity, called AML without maturation.", "correct": false}], "correct_answer": "C. It is associated with CBF-MYH fusion, called acute myelomonocytic leukaemia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/zWLleayKUZkQ8ieI850G1737017754.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:658px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>FAB <span class=\"customMeta\" data-dictid=\"dda6ab11271692777184264b752d39\">classification</span> of AML</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Subtype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Name</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M0</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML undifferentiated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>MPO negative</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML without <span class=\"customMeta\" data-dictid=\"76948f718016927771924774ade7e9\">maturation</span> <strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>MPO +</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML with maturation<br/>\n<strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common</li>\n<li>t(8:21) RUNX1-RUNX1T1 fusion</li>\n<li>Associated with chloroma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute promyelocytic leukaemia<br/>\n<strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>t(15:17) - PML-RAR𝛼 fusion</li>\n<li>Blocks <span class=\"customMeta\" data-dictid=\"cb12d6781c16927771962b853d3946\">promyelocyte</span> → <span class=\"customMeta\" data-dictid=\"23b7c84dee1692777193cbdc4c453d\">myelocyte</span> transformation</li>\n<li>Bone marrow: <span class=\"customMeta\" data-dictid=\"e2af3f82171692777182faad22cbdb\">Auer rods</span> <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> criss-cross called faggot cell</li>\n</ul>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"The Armed Forces Institute of Pathology (AFIP)\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:Faggot_cell_in_AML-M3.jpg\" data-tags=\"\" height=\"430\" src=\"https://image.prepladder.com/content/zWLleayKUZkQ8ieI850G1737017754.png\" width=\"300\"/></p>\n<ul>\n<li>Can cause DIC</li>\n<li>PAS+</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M4</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute <span class=\"customMeta\" data-dictid=\"215dafdbad1692777193dcb48ddd63\">myelomonocytic</span> leukaemia<br/>\n<strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Associated with <span class=\"customMeta\" data-dictid=\"37bf7b21201692777190a7f109cfe4\">inv</span> 16 and CBF-MYH <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene</li>\n<li>Gums - <span class=\"customMeta\" data-dictid=\"09980563461692777188b0de904031\">gum</span> hypertrophy</li>\n<li>Skin - leukaemia cutis</li>\n<li>MPO+, NSE +</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M5</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute <span class=\"customMeta\" data-dictid=\"7eae8f57ab16927771922b5f3d81e4\">monocytic</span> leukaemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gums - <span class=\"customMeta\" data-dictid=\"09980563461692777188b0de904031\">gum</span> hypertrophy</li>\n<li>Skin - leukaemia cutis</li>\n<li>MPO-, NSE +</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M6</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute <span class=\"customMeta\" data-dictid=\"892718f3e916927771871389d2e1a3\">erythroid</span> leukaemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Also called <span class=\"customMeta\" data-dictid=\"7194dbeaed1692777186e2554f8ebf\">DI</span> Guglielmo Disease</li>\n<li>Diffuse PAS+, CD71</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M7</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute megakaryocytic leukaemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">aspiration</span> gives a dry tap</li>\n<li>PAS+, CD41 and CD61</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 12-year-old boy presents with fatigue, bruising, and intermittent fevers for the past few weeks. Physical examination reveals the following findings. Immunophenotyping of the biopsy specimen shows CD43 and MPO positivity. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute Lymphoblastic Leukemia (ALL)", "correct": false}, {"label": "B", "text": "AML with maturation", "correct": true}, {"label": "C", "text": "Acute promyelocytic leukaemia", "correct": false}, {"label": "D", "text": "Non-Hodgkin Lymphoma", "correct": false}], "correct_answer": "B. AML with maturation", "question_images": ["https://image.prepladder.com/content/qdeBtqFZ5TXA5TBxjxuc1737017852.png"], "explanation_images": ["https://image.prepladder.com/content/4ofwUZFHWpgj8tsDLJqz1737017866.png", "https://image.prepladder.com/content/lbb5P84BzQUjir6G63NF1737017947.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/w7lSoYBdjelDdnRQNsnY1745348325.mp3", "video": ""}, {"text": "A 28-year-old female was admitted to the hospital with complaints of frequent nosebleeds, reports of sudden onset chest pain and dyspnea. On examination, she has petechiae and ecchymoses on her skin. Laboratory tests revealed WBC 15,000/µL, haemoglobin 8 g/dL, platelets 20,000/µL and elevated prothrombin time. A peripheral blood smear shows the following findings. Further testing confirms which of the following associated conditions?", "options": [{"label": "A", "text": "t(12:21) translocation", "correct": false}, {"label": "B", "text": "t(15:17) translocation", "correct": true}, {"label": "C", "text": "t(9:22) translocation", "correct": false}, {"label": "D", "text": "t(8:21) translocation", "correct": false}], "correct_answer": "B. t(15:17) translocation", "question_images": ["https://image.prepladder.com/content/lcmSoigk7E2nrSdExUP21737018038.png"], "explanation_images": ["https://image.prepladder.com/content/ZFq9glyEbetlRHkF4KsE1737018100.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following types of AML, according to the FAB classification, is associated with Down’s syndrome?", "options": [{"label": "A", "text": "Acute erythroid leukaemia", "correct": false}, {"label": "B", "text": "Acute myelomonocytic leukaemia", "correct": false}, {"label": "C", "text": "Acute megakaryocytic leukaemia", "correct": true}, {"label": "D", "text": "Acute monocytic leukaemia", "correct": false}], "correct_answer": "C. Acute megakaryocytic leukaemia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is associated with a good prognosis according to WHO classification of AML?", "options": [{"label": "A", "text": "AML: Therapy-related", "correct": false}, {"label": "B", "text": "AML with MDS-like features", "correct": false}, {"label": "C", "text": "AML with recurrent genetic abnormality", "correct": true}, {"label": "D", "text": "AML not otherwise specified", "correct": false}], "correct_answer": "C. AML with recurrent genetic abnormality", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely immunophenotype associated with the condition indicated by the peripheral blood smear shown below?", "options": [{"label": "A", "text": "CD13+, CD33+, CD34+, HLA-DR+", "correct": true}, {"label": "B", "text": "CD19+, CD20-, CD22+, CD79a-", "correct": false}, {"label": "C", "text": "CD3+, CD4+, CD8+, CD5-", "correct": false}, {"label": "D", "text": "CD10+, CD19+, CD20+, CD22-", "correct": false}], "correct_answer": "A. CD13+, CD33+, CD34+, HLA-DR+", "question_images": ["https://image.prepladder.com/content/tCz84oetzThjdm0fni991737018267.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old female presented with fatigue, easy bruising, and recurrent infections over the past few months. On examination, there is mild splenomegaly, but no lymphadenopathy is noted. Laboratory tests reveal pancytopenia. A peripheral blood smear shows normocytic normochromic red blood cells and no blast cells. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Aplastic anemia", "correct": false}, {"label": "B", "text": "Myelodysplasia", "correct": false}, {"label": "C", "text": "Aleukemic leukaemia", "correct": true}, {"label": "D", "text": "Myeloproliferative disorder", "correct": false}], "correct_answer": "C. Aleukemic leukaemia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 65-year-old woman presents with fatigue, night sweats and unintentional weight loss over the past few months. Physical examination reveals palpable lymph nodes and enlarged spleen. Lab tests show significant lymphocytosis (&gt;20,000/μL) with small, mature-appearing lymphocytes. What is true regarding the origin and risk factors of the patient’s condition?", "options": [{"label": "A", "text": "B cells, no exposure to radiation", "correct": true}, {"label": "B", "text": "B-cells, exposure to radiation", "correct": false}, {"label": "C", "text": "Myeloid cells; BTK gene mutation", "correct": false}, {"label": "D", "text": "Myeloid cells; Philadelphia chromosome", "correct": false}], "correct_answer": "A. B cells, no exposure to radiation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Chronic Lymphocytic Leukemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Genetics:</strong></p>\n<ul>\n<li>Trisomy 12,<strong> <span class=\"customMeta\" data-dictid=\"cf1e8ec6121692777185eba2630061\">deletion</span> 13q14</strong>, and others</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Origin:</strong></p>\n<ul>\n<li>Post–germinal center memory B cell or naive B Cells in the <span class=\"customMeta\" data-dictid=\"5ec65d4890169277719136decb922c\">mantle</span> zone of the <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> <strong>(Option A)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Etiopathogenesis</strong></p>\n<ul>\n<li>Antiapoptotic protein BCL2 overexpression.</li>\n<li>CLL cell growth depends on <span class=\"customMeta\" data-dictid=\"10edb6a5071692777183a2d74f0a37\">Bruton Tyrosine kinase</span> (BTK) activity.</li>\n<li>No association with radiation exposure <strong>(Options A and B)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Clinical Presentation</strong></p>\n<ul>\n<li>Most common <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">leukemia</span> in the elderly.</li>\n<li>Frequently <span class=\"customMeta\" data-dictid=\"d1a9a79f701692777182066af09044\">asymptomatic</span> at diagnosis.</li>\n<li>May present with fatigue, lymphadenopathy, hepatosplenomegaly, or infection due to immunosuppression.</li>\n<li>Associated with <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia- spherocytes can be seen on <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> smear</li>\n<li>Can lead to <strong>Hypogammaglobulinemia</strong> as B cells are abnormal</li>\n<li>Infection is the M/C/C of death in CLL</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Laboratory diagnosis:</strong></p>\n<ul>\n<li>Absolute <span class=\"customMeta\" data-dictid=\"c605d4126116927771916c2002638e\">lymphocyte</span> count (ALC) > 5000/mm3</li>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> lymphocytes >30%</li>\n<li>Surface markers using flow <span class=\"customMeta\" data-dictid=\"551a62b1ec169277718587f847e627\">cytometry</span> positive for CD5, CD23, CD19, CD20. CLL co-expresses both T cell (CD5) and B cell (CD20, CD19) markers.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents with generalised fatigue and night sweats. Lab tests reveals Hemoglobin (Hb) 12 g/dL Platelet count 150,000/µL Absolute lymphocyte count (ALC) 45,000/µL Total leukocyte count (TLC) 70,000/µL Differential leukocyte count (DLC) 70% lymphocytes, 20% neutrophils, 5% monocytes, and 5% eosinophils Based on these lab findings, what is the most likely diagnosis?", "options": [{"label": "A", "text": "ALL", "correct": false}, {"label": "B", "text": "AML", "correct": false}, {"label": "C", "text": "CML", "correct": false}, {"label": "D", "text": "CLL", "correct": true}], "correct_answer": "D. CLL", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following peripheral smear images with the respective diagnosis: 1. A. Acute Myeloid Leukemia (AML) 2. B. Chronic Myeloid Leukemia (CML) 3. C. Acute Lymphoblastic Leukemia (ALL) 4. D. Chronic Lymphocytic Leukemia (CLL)", "options": [{"label": "A", "text": "1-B, 2-A, 3-D, 4-C", "correct": false}, {"label": "B", "text": "1-D, 2-A, 3-B, 4-C", "correct": true}, {"label": "C", "text": "1-C, 2-D, 3-B, 4-A", "correct": false}, {"label": "D", "text": "1-D, 2-C, 3-A, 4-B", "correct": false}], "correct_answer": "B. 1-D, 2-A, 3-B, 4-C", "question_images": ["https://image.prepladder.com/content/WwRN5LSp75WkxBhHq56y1737019318.png", "https://image.prepladder.com/content/2ekaFOgr3ELQFTXfnCfA1737019465.png", "https://image.prepladder.com/content/0P4FRhHYUPmJI5hYFYZR1737019369.png", "https://image.prepladder.com/content/nxmnlgBqdBMjDNWtyzAC1737019391.png"], "explanation_images": ["https://image.prepladder.com/content/GJVwLLl0elEQtFYqnsj31737018712.png", "https://image.prepladder.com/content/kvwlZo6xXTt0wlMNrpB11737018838.png", "https://image.prepladder.com/content/zFTMRs8pt16UD5MORPkK1737019156.png", "https://image.prepladder.com/content/5JQghMfzIoBDcNQlHvT51737019218.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:778px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"VashiDonsk \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Leukemia#/media/File:Acute_leukemia-ALL.jpg\" data-tags=\"\" height=\"235\" src=\"https://image.prepladder.com/content/GJVwLLl0elEQtFYqnsj31737018712.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>1. Acute Lymphoblastic Leukemia (ALL):</strong></p>\n<ul>\n<li>Lymphoblasts in <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> ≥ 20%</li>\n<li>Cytoplasmic vacuolations</li>\n<li>They contain fat (Oil Red O Positive)</li>\n<li>Hand mirror-shaped cells</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Makysm\" data-hash=\"\" data-license=\"CC0\" data-source=\"https://en.wikipedia.org/wiki/Acute_myeloid_leukemia#/media/File:Acute_Myeloid_Leukemia_(M2_type).jpg\" data-tags=\"\" height=\"207\" src=\"https://image.prepladder.com/content/kvwlZo6xXTt0wlMNrpB11737018838.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>2. Acute Myeloid Leukemia (AML):</strong></p>\n<ul>\n<li>Blasts ≥ 20%</li>\n<li>Myeloblasts with AuerRods</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Oscier, David & Else, Monica & Matutes, Estela & Morilla, Ricardo & Strefford, Jonathan & Catovsky, Daniel\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Morphological-appearances-of-chronic-lymphocytic-leukaemia-CLL-and-CLL-with-10_fig1_302032812\" data-tags=\"\" height=\"180\" src=\"https://image.prepladder.com/content/zFTMRs8pt16UD5MORPkK1737019156.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>3. Chronic Lymphocytic Leukemia (CLL):</strong></p>\n<ul>\n<li>Smudge cells (or parachute/basket cell): Due to the <span class=\"customMeta\" data-dictid=\"0f4e78e9121692777203594ba840cc\">fragility</span> of lymphocytes during slide preparation</li>\n<li>Convent Girl Appearance: Lot of homogenous, small, mature-like, round lymphocytes with scant cytoplasm</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Chronic_myelogenous_leukemia#/media/File:Chronic_Myeloid_Leukemia_smear_2009-04-09.JPG\" data-tags=\"\" height=\"852\" src=\"https://image.prepladder.com/content/5JQghMfzIoBDcNQlHvT51737019218.png\" width=\"1000\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>4. Chronic Myeloid Leukemia (CML):</strong></p>\n<ul>\n<li>Leukocytosis</li>\n<li>Cell Types: Neutrophils(multilobed nucleus), metamyelocytes (indented nucleus), myelocytes (D-shaped nucleus), and eosinophils (orange cells)</li>\n<li>College girl/garden party appearance: Due to the variety of cell appearances</li>\n<li>Shift to the Left: Presence of <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> cells, mainly <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> neutrophils<br/>\n\t\t\t\ttypes in the blood.</li>\n</ul>\n<br/>\n\t\t\t </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old man presents with fatigue, night sweats, and unintentional weight loss over the past several months. Examination reveals generalised lymphadenopathy and mild splenomegaly. Peripheral blood smear is shown below. Which of the following is not typically associated with the patient's condition?", "options": [{"label": "A", "text": "Autoimmune hemolytic anemia (AIHA)", "correct": false}, {"label": "B", "text": "Evan’s syndrome", "correct": false}, {"label": "C", "text": "Richter’s syndrome", "correct": false}, {"label": "D", "text": "Di Guglielmo Disease", "correct": true}], "correct_answer": "D. Di Guglielmo Disease", "question_images": ["https://image.prepladder.com/content/kHxBnIlkM79hhVOc5EVd1737020530.png"], "explanation_images": ["https://image.prepladder.com/content/kMWAGJdCWOnc6gHwyALT1737020470.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/OjyJKRIEG74l6F3v5yun1748897055.mp3", "video": ""}, {"text": "A 52-year-old male presents with complaints of fatigue, abdominal fullness, and night sweats. His complete blood count shows WBC count of 120,000/μL. A peripheral blood smear shows an increased number of granulocytes at different stages of maturation. A bone marrow aspirate is shown below. Which of the following features can be seen in this condition?", "options": [{"label": "A", "text": "Diffusely effaced lymph node architecture with proliferation centres", "correct": false}, {"label": "B", "text": "Presence of Reed-Sternberg cells", "correct": false}, {"label": "C", "text": "Normal marrow cellularity with increased blast cells", "correct": false}, {"label": "D", "text": "Hypercellular bone marrow with decreased erythroid precursors", "correct": true}], "correct_answer": "D. Hypercellular bone marrow with decreased erythroid precursors", "question_images": ["https://image.prepladder.com/content/Ywt7iEMNmyOsGio8f36M1737020295.png"], "explanation_images": ["https://image.prepladder.com/content/8rqdxRVnMwOsUiqruHLS1737020399.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:658px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">Leukemia</span> (CML) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Chronic Lymphocytic <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">Leukemia</span> (CLL)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hypercellular marrow</li>\n<li>Increased myeloid: <span class=\"customMeta\" data-dictid=\"892718f3e916927771871389d2e1a3\">erythroid</span> ratio</li>\n<li>Dwarf megakaryocytes</li>\n<li>Sea blue histiocytes or Pseudo-Gaucher cells</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hypocellularity (decreased erythrocytes, megakaryocytes)</li>\n<li>Increased lymphocytes</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 62-year-old woman presents with fatigue, unintentional weight loss, and occasional night sweats over the past few months. On physical examination, cervical lymphadenopathy is noted. A complete blood count reveals leukocytosis with an absolute lymphocyte count of 10,000/mm3. Which of the following flow cytometry marker profiles is most consistent with this form of leukemia?", "options": [{"label": "A", "text": "CD5+, CD19+, CD23+, CD10-", "correct": true}, {"label": "B", "text": "CD20+, CD79a+, CD5+, CD25-", "correct": false}, {"label": "C", "text": "CD3+, CD5+, CD19+, CD20-", "correct": false}, {"label": "D", "text": "CD10+, CD19+, CD22+, CD23-", "correct": false}], "correct_answer": "A. CD5+, CD19+, CD23+, CD10-", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following are the good prognostic factors of CLL?", "options": [{"label": "A", "text": "NOTCH1 mutations", "correct": false}, {"label": "B", "text": "CD38+", "correct": false}, {"label": "C", "text": "Expression of Zap 70", "correct": false}, {"label": "D", "text": "Expression of MiR-15/16", "correct": true}], "correct_answer": "D. Expression of MiR-15/16", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:642px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Good <span class=\"customMeta\" data-dictid=\"cfb6c738351692777196f69788a66e\">prognostic</span> factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Poor <span class=\"customMeta\" data-dictid=\"cfb6c738351692777196f69788a66e\">prognostic</span> factors</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Post GC B cell</li>\n<li>Expression of MicroRNA15 and 16 (acts as tumor suppressors) <strong>(Option D)</strong></li>\n<li>Deletion of 13q14</li>\n</ul>\n</td>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Naive B-cell</li>\n<li>NOTCH 1 <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> (commonly associated with <span class=\"customMeta\" data-dictid=\"5e54fdc4d3169277720003f231621d\">Trisomy</span> 12) <strong>(Option A)</strong></li>\n<li>Deletion of 11q, 17p</li>\n<li>Richter’s transformation (DLBCL transformation)</li>\n<li>Expression of ZAP 70 <strong>(Option C)</strong></li>\n<li>Increased CD38 expression </li>\n<li>High β2-microglobulin levels</li>\n<li>Lack of <span class=\"customMeta\" data-dictid=\"3db910d8571692777198303e3bcb27\">somatic</span> hypermutation</li>\n<li>High <span class=\"customMeta\" data-dictid=\"511c533d8b1692777191aa64479963\">LDH</span> levels</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old man presents with purulent nasal discharge, headache, sore throat, and nonproductive cough. He has maxillary sinus tenderness, pharyngeal erythema, and tender anterior cervical lymphadenopathy. Laboratory results are as follows: Leukocytes 58,000/mm3 Neutrophils 42% Myelocytes 30% Metamyelocytes 8% Band forms 1% Blast cells 1% Eosinophils 6% Basophils 4% The leukocyte alkaline phosphatase score is low. Which of the following is the most likely diagnosis and its appropriate management/drug for treatment?", "options": [{"label": "A", "text": "Leukemoid reaction and Amoxicillin", "correct": false}, {"label": "B", "text": "CML and Imatinib mesylate", "correct": true}, {"label": "C", "text": "ALL and vincristine", "correct": false}, {"label": "D", "text": "AML and stem cell transplant", "correct": false}], "correct_answer": "B. CML and Imatinib mesylate", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p style=\"text-align:center\"><strong>CML</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Genetics:</strong></p>\n<p>Philadelphia <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> (t(9;22))</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Origin:</strong></p>\n<p>Myeloid lineage</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Etiopathogenesis:</strong></p>\n<ul>\n<li>BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene due to t(9;22) causes tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> activity much above normal</li>\n<li>Radiation exposure</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Clinical features:</strong></p>\n<ul>\n<li>Occurs in adults.</li>\n<li>Often presents with splenomegaly, fatigue, weight loss, night sweats, and <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> discomfort.</li>\n<li>Can progress to a <span class=\"customMeta\" data-dictid=\"c961b3ec6516927771831836e7f351\">blast crisis</span> with features of <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> leukemia.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Diagnosis:</strong></p>\n<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> <span class=\"customMeta\" data-dictid=\"a246c8382816927771821a267ea486\">aspirate</span> to confirm diagnosis</li>\n<li>FISH - presence of BCR ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene product.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Management:</strong></p>\n<p>Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> inhibitors such as Imatinib <strong>(Option B)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man who is a known case of chronic phase CML presents with increasing fatigue, weight loss, and abdominal discomfort. His physical examination reveals splenomegaly. Lab tests show a persistent decline in platelet counts, increased circulating basophils, and a blast count of 12%. What is the most likely explanation for the patient's clinical presentation and laboratory findings?", "options": [{"label": "A", "text": "Progression to accelerated phase CML", "correct": true}, {"label": "B", "text": "Development of acute lymphoblastic leukemia", "correct": false}, {"label": "C", "text": "Entry into the blast crisis phase of CML", "correct": false}, {"label": "D", "text": "Development of secondary myelofibrosis", "correct": false}], "correct_answer": "A. Progression to accelerated phase CML", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:647px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>1) Chronic phase:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Leukocytosis, < 10% blast cells, basophils <20% and <span class=\"customMeta\" data-dictid=\"cc8beb11041692777192b19dfb290a\">monocytosis</span> < 3%</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>2) Accelerated phase:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>10%-19% blasts, ≥ 20% basophils in the <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood or bone marrow</li>\n<li>Persistent or increasing <span class=\"customMeta\" data-dictid=\"09be7d1f11169277720210bf5b0280\">WBC</span> (>10 × 10^9/L) and splenomegaly, unresponsive to therapy</li>\n<li>Persistent <span class=\"customMeta\" data-dictid=\"2a6fe222d7169277720012fabb1227\">thrombocytosis</span> (>1000 × 10^9/L), unresponsive to therapy</li>\n<li>Persistent <span class=\"customMeta\" data-dictid=\"fc28c74bb716927772003aee4aa43c\">thrombocytopenia</span> (<100 × 10^9/L) unrelated to therapy</li>\n<li>This phase often leads to the <span class=\"customMeta\" data-dictid=\"16b76d1d1c1692777200240efcb0e2\">terminal</span> <span class=\"customMeta\" data-dictid=\"c961b3ec6516927771831836e7f351\">blast crisis</span> within 6-12 months</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>3) Blast Crisis:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>≥20% blasts in <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood or bone marrow</li>\n<li>In 50% of patients, the <span class=\"customMeta\" data-dictid=\"c961b3ec6516927771831836e7f351\">blast crisis</span> occurs abruptly without an accelerated phase</li>\n<li>Extensive <span class=\"customMeta\" data-dictid=\"0ba1f7edfa1692777187ae6f51e603\">extramedullary</span> <span class=\"customMeta\" data-dictid=\"bb774c3cec1692777188327b4bc737\">hematopoiesis</span> occurs to compensate for <span class=\"customMeta\" data-dictid=\"32c39405871692777184d06d6c01ab\">CML</span> and leads to significant splenomegaly</li>\n<li>Transformation into <span class=\"customMeta\" data-dictid=\"9ab5f0308116927771814e1fcc72d6\">AML</span> is more predominant than ALL</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old male presents with fatigue, abdominal discomfort, and splenomegaly. Lab tests reveal a markedly elevated WBC count with a left shift and increased myeloid precursor forms on peripheral blood smear. Which of the following statements regarding the leukocyte (neutrophil) alkaline phosphatase (LAP) score in this condition is correct?", "options": [{"label": "A", "text": "Normal LAP score", "correct": false}, {"label": "B", "text": "Increased due to excessive myeloid cell production", "correct": false}, {"label": "C", "text": "Decreased due to cytochemical abnormal WBCs", "correct": true}, {"label": "D", "text": "LAP score is relevant only in acute leukemia", "correct": false}], "correct_answer": "C. Decreased due to cytochemical abnormal WBCs", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Increased LAP score</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Decreased LAP score</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Leukemoid reaction</li>\n<li>Neutrophilia / Sepsis</li>\n<li>Pregnancy</li>\n<li>OCP</li>\n<li>Down’s syndrome</li>\n</ul>\n</td>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> leukemia</li>\n<li>Paroxysmal <span class=\"customMeta\" data-dictid=\"d51601f2c41692777193ddfa55d163\">nocturnal</span> hemoglobinuria</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old patient presents with fatigue, weight loss, and abdominal discomfort. Labs reveal a markedly elevated WBC count with a left shift and increased myeloid precursor forms on peripheral blood smear as shown below. Which of the following is the investigation of choice to confirm the diagnosis?", "options": [{"label": "A", "text": "Bone Marrow Aspiration and Biopsy", "correct": false}, {"label": "B", "text": "Flow Cytometry Analysis of Peripheral Blood", "correct": false}, {"label": "C", "text": "Fluorescent in situ hybridisation (FISH)", "correct": true}, {"label": "D", "text": "Serum Lactate Dehydrogenase (LDH) Levels", "correct": false}], "correct_answer": "C. Fluorescent in situ hybridisation (FISH)", "question_images": ["https://image.prepladder.com/content/lys5a5nleHggGFs4R1Ae1737021047.png"], "explanation_images": ["https://image.prepladder.com/content/9Y3HvaEiCVzCzSLfNhLy1737021006.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top; width:576px\">\n<p style=\"text-align:center\"><strong>CML</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top; width:576px\">\n<p><strong>Genetics:</strong></p>\n<p>Philadelphia <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> (t(9;22))</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top; width:576px\">\n<p><strong>Origin:</strong></p>\n<p>Myeloid lineage</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top; width:576px\">\n<p><strong>Etiopathogenesis:</strong></p>\n<ul>\n<li>BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene causes tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> activity over normal</li>\n<li>Radiation exposure</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top; width:576px\">\n<p><strong>Clinical features:</strong></p>\n<ul>\n<li>Occurs in adults.</li>\n<li>Often presents with splenomegaly, fatigue, weight loss, night sweats, and <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> discomfort. </li>\n<li>Can progress to a <span class=\"customMeta\" data-dictid=\"c961b3ec6516927771831836e7f351\">blast crisis</span> with features of <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> leukemia. </li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top; width:576px\">\n<p><strong>Diagnosis:</strong></p>\n<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> <span class=\"customMeta\" data-dictid=\"a246c8382816927771821a267ea486\">aspirate</span> to confirm diagnosis </li>\n<li>FISH - presence of BCR ABL Fusion gene product.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top; width:576px\">\n<p><strong>Management:</strong></p>\n<p>Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> inhibitors such as Imatinib </p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old male presents with fatigue and abdominal discomfort. Laboratory investigations reveal a markedly elevated WBC count with a left shift and increased myeloid precursor forms on peripheral blood smear. Which of the following features would help differentiate Chronic Myelogenous Leukemia (CML) from a leukemoid reaction?", "options": [{"label": "A", "text": "Massive splenomegaly", "correct": true}, {"label": "B", "text": "High LAP score", "correct": false}, {"label": "C", "text": "History of recent antibiotic use", "correct": false}, {"label": "D", "text": "Resolution of neutrophilia after treating the underlying cause", "correct": false}], "correct_answer": "A. Massive splenomegaly", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:594px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>CML</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Leukemoid Reaction</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cause</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>t (9:22) BCR/ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sepsis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Spleen </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Massive Splenomegaly</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No splenomegaly</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TLC </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High but not as high as CML</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LAP score </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Decreased <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Basophils </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>> 20% in accelerated phase</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No basophilia</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Match the following lymphomas with their cell of origin. Lymphoma/leukaemia Cell of origin 1. Diffuse large B-cell lymphoma a. Memory B-cell 2. Mantle cell lymphoma b. Germinal/post germinal center B cell 3. Hairy cell lymphoma c. Helper T-cell 4. Mycosis fungoides d. Naive B cell", "options": [{"label": "A", "text": "1-b, 2-a, 3-c, 4-d", "correct": false}, {"label": "B", "text": "1-a, 2-b, 3-d, 4-c", "correct": false}, {"label": "C", "text": "1-d, 2-a, 3-d, 4-c", "correct": false}, {"label": "D", "text": "1-b, 2-d, 3-a, 4-c", "correct": true}], "correct_answer": "D. 1-b, 2-d, 3-a, 4-c", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:715px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Neoplasm </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Cell of origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse large B-cell lymphoma <strong>(Statement 1)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Germinal/post-germinal center B cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common NHL.</li>\n<li>Associated with BCL6 gene rearrangement</li>\n<li>If <span class=\"customMeta\" data-dictid=\"f8109755621692777184ae2847c580\">CLL</span> transforms into DLBCL, it is called Richter's Syndrome.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hairy cell leukemia <strong>(Statement 3)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Memory B cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>More common in boys.</li>\n<li>BRAF V600E <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">Mutation</span> +</li>\n<li>It presents with massive <span class=\"customMeta\" data-dictid=\"b3eb52fe3b1692777199de8465eea8\">splenomegaly</span> affecting the red <span class=\"customMeta\" data-dictid=\"5b7b8d266716927771968316ee113b\">pulp</span> of the spleen.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mantle cell lymphoma <strong>(Statement 2)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Naive B cell</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Translocation t(11:14).</li>\n<li>Associated with GIT polyps.</li>\n<li>Cyclin D1 and SOX11 +ve,</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mycosis Fungoides <strong>(Statement 4)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Helper T cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cutaneous T-cell NHL.</li>\n<li>presents with <span class=\"customMeta\" data-dictid=\"f0f3e105661692777187df507b1f26\">erythema</span> and pruritus.</li>\n<li>If it affects the blood vessels, it is known as Sezary syndrome.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with a three-year history of pruritic, erythematous plaques on his trunk and extremities. Physical examination reveals widespread erythematous patches and plaques with a \"cerebriform\" appearance. Peripheral smear findings reveal the presence of abnormal lymphocytes with convoluted nuclei and abundant cytoplasm. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Mycosis fungoides", "correct": true}, {"label": "B", "text": "Adult T-cell leukemia", "correct": false}, {"label": "C", "text": "Anaplastic large cell lymphoma", "correct": false}, {"label": "D", "text": "Hairy cell leukemia", "correct": false}], "correct_answer": "A. Mycosis fungoides", "question_images": ["https://image.prepladder.com/content/un146u0K2KCP1sx2I9e01737648493.png"], "explanation_images": ["https://image.prepladder.com/content/ULsokzLKj50S8YdcugCM1737648595.png", "https://image.prepladder.com/content/fa5s7FclCKRPWJzO4Zzs1737047568.png", "https://image.prepladder.com/content/LCjhk81EJSWyxnKyhNHT1737648554.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:775px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\"> </td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Anaplastic Large-Cell Lymphoma</strong></p>\n<p style=\"text-align:center\"><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Adult T-Cell Leukemia/Lymphoma</strong></p>\n<p style=\"text-align:center\"><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Mycosis Fungoides</strong></p>\n<p style=\"text-align:center\"><strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Genetic Alterations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>ALK gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 2</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>HTLV-1</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cutaneous T-Cell Lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Age Group </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Children or young adults</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Adults</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Adults</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Cell Morphology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Anaplastic_large-cell_lymphoma#/media/File:Anaplastic_large_cell_lymphoma_-_cropped_-_very_high_mag.jpg\" data-tags=\"\" height=\"2665\" src=\"https://image.prepladder.com/content/ULsokzLKj50S8YdcugCM1737648595.png\" width=\"4167\"/></p>\n<p>Large <span class=\"customMeta\" data-dictid=\"85e45aad91169277718175491e3e68\">anaplastic</span> cells with horseshoe-shaped <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and voluminous <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> (<strong>Hallmark cells/Doughnut cells</strong>)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"K. Rasul, Z. A. Barwari\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.semanticscholar.org/paper/Adult-T-cell-leukemia-lymphoma.-Rasul-Barwari/3b7a41011c9b8518464596f35675ecd9dc9f5665/figure/2\" data-tags=\"\" height=\"2884\" src=\"https://image.prepladder.com/content/fa5s7FclCKRPWJzO4Zzs1737047568.png\" width=\"4167\"/></p>\n\t\t\t \n\n\t\t\t<p>Multilobated <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> <strong>(Cloverleaf or Flower cells)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"CC BY SA\" data-source=\"https://wiki.clinicalflow.com/mycosis-fungoidess%C3%A9zary-syndrome-mfss\" data-tags=\"\" height=\"3054\" src=\"https://image.prepladder.com/content/LCjhk81EJSWyxnKyhNHT1737648554.png\" width=\"4167\"/></p>\n\t\t\t \n\n\t\t\t<p>Neoplastic T cells with <span class=\"customMeta\" data-dictid=\"19b43840a41692777184d27ec15616\">cerebriform</span> <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> (<strong>Sezary cells</strong>)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Common Clinical Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Soft tissue involvement (mimicking metastatic carcinoma)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Skin lesions</li>\n<li>Generalised lymphadenopathy</li>\n<li>Hepatosplenomegaly</li>\n<li>Hypercalcemia</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cutaneous lesions(erythematous patches and plaques with a \"cerebriform\" appearance)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Good</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Poor</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Median survival of roughly 10 years.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presents with persistent fatigue, splenomegaly, and pancytopenia. Peripheral blood smear shows leukocytosis with mature lymphocytes displaying hairy projections. Flow cytometry confirms the presence of CD11c and CD25 positive cells. Which of the following is the most specific biomarker commonly useful in the diagnosis of condition?", "options": [{"label": "A", "text": "CD 20", "correct": false}, {"label": "B", "text": "Annexin A5", "correct": false}, {"label": "C", "text": "Annexin A1", "correct": true}, {"label": "D", "text": "Apolipoprotein A1", "correct": false}], "correct_answer": "C. Annexin A1", "question_images": ["https://image.prepladder.com/content/xLxtQkLx3HE3DJZoP6oU1737046592.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male has been complaining of persistent fatigue, recurrent infections, and easy bruising over the past few months. On physical examination, he has a noticeable abdominal mass. A peripheral smear shows the presence of atypical lymphoid cells with cytoplasmic projections, as shown in the image below. Which of the following statements is not true regarding the patient's condition?", "options": [{"label": "A", "text": "Associated with the BRAF V600E mutation.", "correct": false}, {"label": "B", "text": "Massive splenomegaly is a common clinical feature.", "correct": false}, {"label": "C", "text": "The pathogenesis involves the proliferation of immature myeloid cells", "correct": true}, {"label": "D", "text": "Typically present with fatigue, infections, and pancytopenia.", "correct": false}], "correct_answer": "C. The pathogenesis involves the proliferation of immature myeloid cells", "question_images": ["https://image.prepladder.com/content/N5Q3na2klNe3FFEPfo1N1737046585.png"], "explanation_images": ["https://image.prepladder.com/content/fqxIyy8qhoFi9UW042Py1737046673.png", "https://image.prepladder.com/content/9W9nS2EhFebJhChXgMtV1737046713.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Mutations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>BRAF V600E <strong>(Option A ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Pathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mutation of BRAF V600E gene → <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">Activation</span> of the BRAF protein → MAPK/ERK signalling <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> → Uncontrolled <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and survival of <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> B-cells (Hairy cells).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Clinical Presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Presents with fatigue, <span class=\"customMeta\" data-dictid=\"c64e3a661b1692777197afc2ff7bca\">recurrent</span> infections, easy bruising, (e.g., early satiety, <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> discomfort), pancytopenia <strong>(Option D ruled out) </strong>and symptoms related to <span class=\"customMeta\" data-dictid=\"b3eb52fe3b1692777199de8465eea8\">splenomegaly</span> <strong>(Option B ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Peripheral Blood Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Hairy cells with round, oblong, or <span class=\"customMeta\" data-dictid=\"77adee7b1016927771972574741517\">reniform</span> <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and pale blue cytoplasm.</li>\n</ul>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Hairy_cell_leukemia#/media/File:Hairy_cell_leukemia_smear_2009-08-20.JPG\" data-tags=\"\" height=\"3190\" src=\"https://image.prepladder.com/content/fqxIyy8qhoFi9UW042Py1737046673.png\" width=\"4167\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"754ab07a2e1692777183ed178c883d\">Biopsy</span> Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Hypocellular or fibrotic <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> with \"hairy cells\".</li>\n<li>Fried egg appearance.</li>\n</ul>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Mark ong\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Bone_marrow_infiltration_by_hairy_cell_leukaemia.jpg\" data-tags=\"\" height=\"3175\" src=\"https://image.prepladder.com/content/9W9nS2EhFebJhChXgMtV1737046713.png\" width=\"4167\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Flow cytometry</li>\n<li>Immunophenotyping</li>\n<li>Genetic testing for BRAF V600E mutation</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Rituximab - BRAF inhibitors</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Excellent</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match each lymphoma or leukaemia type with its corresponding histopathological finding. Lymphoma/Leukemia Type Histopathological Finding 1.Follicular Lymphoma A) 2. Burkitt's Lymphoma B) 3. Diffuse Large B-Cell Lymphoma (DLBCL) C) 4. Hairy Cell Leukemia D)", "options": [{"label": "A", "text": "1-C, 2-B, 3-A, 4-D", "correct": true}, {"label": "B", "text": "1-B, 2-A, 3-D, 4-C", "correct": false}, {"label": "C", "text": "1-D, 2-C, 3-B, 4-A", "correct": false}, {"label": "D", "text": "1-A, 2-D, 3-C, 4-B", "correct": false}], "correct_answer": "A. 1-C, 2-B, 3-A, 4-D", "question_images": ["https://image.prepladder.com/content/3oJgGcblGsIiJ5CCocyI1737046351.png", "https://image.prepladder.com/content/b8tUXqBHDQdRxO9PZ77K1737046103.png", "https://image.prepladder.com/content/s7b59XrouPHh1Acj1loQ1737046236.png", "https://image.prepladder.com/content/VbZUrdMgPnX8CCDEJBUO1737046445.png"], "explanation_images": ["https://image.prepladder.com/content/2N7oyyIuYqegx3SEA2RB1737046245.png", "https://image.prepladder.com/content/nVO3T5ePWeLdwWCPt2DJ1737046149.png", "https://image.prepladder.com/content/jaim8YL3xecFZe0g1ekI1737046337.png", "https://image.prepladder.com/content/fl6jO46katDr2K36QUjd1737046428.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:625px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Lymphoma/Leukemia Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Histopathological Finding</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>HPE image</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<p><strong>1. Follicular lymphoma </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<p>Cleaved lymphocytes.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Follicular_lymphoma#/media/File:Follicular_lymphoma_--_low_mag.jpg\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/2N7oyyIuYqegx3SEA2RB1737046245.png\" width=\"594\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>2. Burkitt’s Lymphoma </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>\"Starry sky\" appearance with interspersed macrophages.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"CoRus13 \" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Burkitt_lymphoma#/media/File:Burkitt's_lymphoma_in_a_kidney_biopsy,_very_high_mag.jpg\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/nVO3T5ePWeLdwWCPt2DJ1737046149.png\" width=\"490\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>3. DLBCL</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> cells with <span class=\"customMeta\" data-dictid=\"4b0fee14c816927772016e67cf3a13\">vesicular</span> <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and prominent nucleoli.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Diffuse_large_B-cell_lymphoma#/media/File:Diffuse_large_B_cell_lymphoma_-_cytology_low_mag.jpg\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/jaim8YL3xecFZe0g1ekI1737046337.png\" width=\"592\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>4. Hairy cell leukemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cells with fine hair-like projections.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Hairy_cell_leukemia#/media/File:Hairy_cell_leukemia_smear_2009-08-20.JPG\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/fl6jO46katDr2K36QUjd1737046428.png\" width=\"523\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2JFvkp4X1pzSI7dT00pe1747819296.mp3", "video": ""}, {"text": "Which of the following statements correctly differentiates between Primary Effusion Lymphoma (PEL) and Immunodeficiency-associated Large B-cell Lymphoma?", "options": [{"label": "A", "text": "PEL presents with lymphomatous masses in solid organs, while Immunodeficiency-associated Large B-cell Lymphoma presents as effusions.", "correct": false}, {"label": "B", "text": "PEL is associated with EBV , whereas Immunodeficiency-associated Large B-cell Lymphoma is linked to HHV-8.", "correct": false}, {"label": "C", "text": "PEL presents as Effusions and is associated with HHV-8, whereas Immunodeficiency-associated Large B-cell Lymphoma is linked to EBV.", "correct": true}, {"label": "D", "text": "Both are predominantly found in immunocompetent individuals without any viral association.", "correct": false}], "correct_answer": "C. PEL presents as Effusions and is associated with HHV-8, whereas Immunodeficiency-associated Large B-cell Lymphoma is linked to EBV.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:644px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Primary <span class=\"customMeta\" data-dictid=\"73909075e71692777187f08d3c9b7e\">Effusion</span> <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">Lymphoma</span> (PEL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Immunodeficiency-associated Large B-cell Lymphoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Malignant pleural or ascitic effusion</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Solid or nodal tumours</strong>, or <span class=\"customMeta\" data-dictid=\"7fa42cc96416927771877d60e9fae2\">extranodal</span> involvement, often in <span class=\"customMeta\" data-dictid=\"a3cc9f976916927771895692a1a8a0\">immunocompromised</span> individuals.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Patient Demographics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Mostly in patients with advanced <span class=\"customMeta\" data-dictid=\"fa9d83d3d41692777189a8b393dd60\">HIV</span> infection or in older adults</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Seen in patients with advanced <span class=\"customMeta\" data-dictid=\"fa9d83d3d41692777189a8b393dd60\">HIV</span> infection and recipients of organ or <span class=\"customMeta\" data-dictid=\"31f3475bb416927771894ea8f40643\">HSC</span> transplants.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Appearance of Tumor Cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li><strong>Anaplastic</strong> in appearance,</li>\n<li>Typically, <strong>do not express surface B- or T-cell markers</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li><strong>Neoplastic B cells</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Viral Association With Pathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li><strong>HHV-8 infection</strong> appears to have a causal role</li>\n<li>HIV</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>EBV infection</strong> plays a critical <span class=\"customMeta\" data-dictid=\"aab99c76cb16927771946daf9e4dbf\">pathogenic</span> role</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 14-year-old boy from Bihar presents with a low-grade fever, weight loss, and abdominal pain for the past 2 months. Investigation reveals a mass involving the ileocecal region, with histopathological examination showing a 'starry sky' appearance, immunohistochemistry positive for CD10, CD19, CD20, and BCL6, and FISH indicating a (8:14) translocation involving the MYC gene. This type of presentation is common in which condition?", "options": [{"label": "A", "text": "Endemic Burkitt’s lymphoma", "correct": false}, {"label": "B", "text": "Sporadic Burkitt’s lymphoma", "correct": true}, {"label": "C", "text": "HIV-associated Burkitt’s lymphoma", "correct": false}, {"label": "D", "text": "All of the above", "correct": false}], "correct_answer": "B. Sporadic Burkitt’s lymphoma", "question_images": ["https://image.prepladder.com/content/3mTUj901WpERh9AdNWtW1737045892.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following neoplasm with its appropriate genetic mutation. Neoplasia Genetic mutation 1. Mantle cell lymphoma A. BCL6 gene 2. Burkitt’s lymphoma B. Cyclin D1 gene 3. Diffuse large B cell lymphoma C. BCL10 / MALT1 4. Marginal zone lymphoma D. MYC gene", "options": [{"label": "A", "text": "1-B, 2-D, 3-A, 4-C", "correct": true}, {"label": "B", "text": "1-B, 2-A ,3-C ,4-D", "correct": false}, {"label": "C", "text": "1-A ,2-C ,3-D,4- B", "correct": false}, {"label": "D", "text": "1-C ,2-D ,3-A ,4- B", "correct": false}], "correct_answer": "A. 1-B, 2-D, 3-A, 4-C", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:681px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>NEOPLASIA</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>GENETIC MUTATION</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Other points</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Burkitt’s <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> (Statement 2)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>t(8:14) <strong>c-MYC gene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Associated with <span class=\"customMeta\" data-dictid=\"e4f6b2922d16927771865030175a86\">EBV</span> and HIV.</li>\n<li>3 types: Endemic, <span class=\"customMeta\" data-dictid=\"a325d0c14e16927771992fe8a96758\">Sporadic</span> and <span class=\"customMeta\" data-dictid=\"fa9d83d3d41692777189a8b393dd60\">HIV</span> associated.</li>\n</ul>\n<ul>\n<li>HPE shows ‘starry sky’ appearance</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>DLBCL (Statement 3)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>BCL6</strong> rearrangement</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common NHL</li>\n<li>If <span class=\"customMeta\" data-dictid=\"f8109755621692777184ae2847c580\">CLL</span> transforms into DLBCL, it is called Richter's Syndrome.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extranodal marginal zone <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> (Statement 4)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>t(11:18) - API2-MLT fusion</p>\n<p>t(1:14) - <strong>BCL10</strong>-<strong>IGH fusion</strong></p>\n<p>t(14:18) - <strong>MALT1-IGH fusion</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Associated with\n\t\t\t\t<ul>\n<li>H.pylori infection</li>\n<li>Sjogran's Syndrome</li>\n<li>Hashimoto's Disease.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mantle cell <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> (Statement 1)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>t(11:14) -<strong> Cyclin-D1</strong> IGH fusion</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Associated with GIT polyps</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old man presents to the outpatient department with an axillary mass and complaints of low-grade fever, weight loss, and night sweats for the past 6 months. Histopathological examination (HPE) of a biopsy sample from the mass reveals diffuse follicular growth with centrocytes with cleaved nuclei and centroblasts. Immunohistochemistry shows BCL2 stain positive, CD19, CD20, and CD10 positive, and CD5 negative. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Follicular hyperplasia", "correct": false}, {"label": "B", "text": "Mantle cell lymphoma", "correct": false}, {"label": "C", "text": "Follicular lymphoma", "correct": true}, {"label": "D", "text": "Burkitt’s lymphoma", "correct": false}], "correct_answer": "C. Follicular lymphoma", "question_images": ["https://image.prepladder.com/content/YCZ4LRQzCjJwIHEQyXER1737045441.png"], "explanation_images": ["https://image.prepladder.com/content/Ty7e2K2qkiYfDqleJuoH1737045717.png", "https://image.prepladder.com/content/mDPklt3OlCZ6heqNBcO01737045507.png", "https://image.prepladder.com/content/nOLt95h8iwXcltY8gZOp1737045585.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Surface IHC marker </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Follicular Lymphoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CD5 -ve</strong>, CD10+ve, CD19+ve, CD20+ve, BCL2+ve, BCL6+ve, Surface Ig+ve</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Follicular Hyperplasia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD3+ve, CD10+ve, CD20+ve, BCL2 -ve, BCL6+ve</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mantle Cell Lymphoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cyclin D1+ve</strong>, CD19+ve, CD20+ve, Surface Ig (usually <span class=\"customMeta\" data-dictid=\"e4a6fd7fbb169277718986a699e800\">IgM</span> and IgD) +ve, <strong>CD5+ve</strong>, CD23 -ve</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Burkitt’s Lymphoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IgM+ve, <strong>CD19+ve, CD20+ve</strong>, CD10+ve, <strong>BCL6+ve, BCL2 -ve</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An 8-year-old boy presents with a large mass over the mandible. On the HPE of the lesion, a ‘starry sky pattern’ is seen, similar to the image below. This condition is associated with which of the following genetic abnormalities?", "options": [{"label": "A", "text": "MYC gene", "correct": true}, {"label": "B", "text": "BCL2 gene", "correct": false}, {"label": "C", "text": "Cyclin-D1", "correct": false}, {"label": "D", "text": "BCL6 gene", "correct": false}], "correct_answer": "A. MYC gene", "question_images": ["https://image.prepladder.com/content/9gT8hlaTFCsuG35jSJ0C1737045056.png"], "explanation_images": ["https://image.prepladder.com/content/6lFCMSd7TCldLk9ZWagZ1737045118.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old female presents with painless swelling of the neck, intermittent fever, night sweats and significant weight loss over the past three months. On examination, enlarged cervical and mediastinal lymph nodes are noted. A biopsy reveals the presence of characteristic cells, as shown in the image below. Which of the following about the described condition is NOT true?", "options": [{"label": "A", "text": "More often localised to a single axial group of nodes", "correct": false}, {"label": "B", "text": "Typically, it spreads in a contiguous manner.", "correct": false}, {"label": "C", "text": "Mesenteric nodes and Waldeyer ring involvement are rare.", "correct": false}, {"label": "D", "text": "Extranodal presentation is common.", "correct": true}], "correct_answer": "D. Extranodal presentation is common.", "question_images": ["https://image.prepladder.com/content/0sAil4HQlwA5mum26ewF1737648708.png"], "explanation_images": ["https://image.prepladder.com/content/oNrZSnRzY6u07lq7oNkV1737023697.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:642px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Hodgkin <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">Lymphoma</span> (HL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Non-Hodgkin <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">Lymphoma</span> (NHL)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Age of presentation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bimodal distribution peaks in young adults (15-35 years) and older adults (over 55).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More common in older adults but can occur at any age.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Localisation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More often localised to a single <span class=\"customMeta\" data-dictid=\"01591f7f591692777182ef8aa2360c\">axial</span> group of nodes (cervical, mediastinal, para-aortic) <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More frequent involvement of multiple <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> nodes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pattern of Spread</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Orderly spread by contiguity</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non <span class=\"customMeta\" data-dictid=\"2a2420d6bc1692777185ac0cb7e93d\">Contiguous</span> spread <strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involvement of Mesenteric Nodes and Waldeyer Ring</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mesenteric nodes and Waldeyer ring are rarely involved. <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Waldeyer ring and mesenteric nodes are commonly involved.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extranodal Presentation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extranodal presentation is rare.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extranodal presentation is common. <strong>(Option D)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ftQOtKLSSaJO2XKxoRTi1747308775.mp3", "video": ""}, {"text": "A 35-year-old woman came with complaints of chronic fatigue and a palpable nodular mass in her axilla. Further investigations reveal a B-cell neoplasm. Which of the following is the least likely diagnosis?", "options": [{"label": "A", "text": "Follicular lymphoma", "correct": false}, {"label": "B", "text": "Marginal zone lymphoma", "correct": false}, {"label": "C", "text": "Hairy cell leukemia", "correct": false}, {"label": "D", "text": "Anaplastic large cell lymphoma", "correct": true}], "correct_answer": "D. Anaplastic large cell lymphoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1. <span class=\"customMeta\" data-dictid=\"ae13cdc5c3169277719683e9f6bda5\">Precursor</span> B-cell neoplasm</p>\n<p>B-cell <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> lymphoblastic leukemia/lymphoma (B-ALL)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2. <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">Peripheral</span> B-cell neoplasm</p>\n<ul>\n<li>Chronic lymphocytic leukemia/small lymphocytic lymphoma</li>\n<li>B-cell prolymphocytic leukemia</li>\n<li>Lymphoplasmacytic lymphoma</li>\n<li>Splenic and nodal marginal zone lymphomas</li>\n<li>Extranodal marginal zone lymphoma</li>\n<li>Mantle cell lymphoma</li>\n<li>Follicular <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> <strong>(Option A)</strong></li>\n<li>Marginal zone <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> <strong>(Option B)</strong></li>\n<li>Hairy cell <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">leukemia</span> <strong>(Option C)</strong></li>\n<li>Plasmacytoma/plasma cell myeloma</li>\n<li>Diffuse large B-cell lymphoma</li>\n<li>Burkitt lymphoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3. <span class=\"customMeta\" data-dictid=\"ae13cdc5c3169277719683e9f6bda5\">Precursor</span> T-cell neoplasm</p>\n<p>T-cell <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> lymphoblastic leukemia/lymphoma (T-ALL)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4. <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">Peripheral</span> T-cell and NK-cell neoplasms</p>\n<ul>\n<li>T-cell prolymphocytic leukemia</li>\n<li>Large <span class=\"customMeta\" data-dictid=\"4f63eb15be169277718848d4b4978b\">granular</span> lymphocytic leukemia</li>\n<li>Mycosis fungoides/Sézary syndrome</li>\n<li>Peripheral T-cell lymphoma, unspecified</li>\n<li>Anaplastic large-cell <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> (Option D)</li>\n<li>Angioimmunoblastic T-cell lymphoma</li>\n<li>Enteropathy-associated T-cell lymphoma</li>\n<li>Panniculitis-like T-cell lymphoma</li>\n<li>Hepatosplenic γδ T-cell lymphoma</li>\n<li>Adult T-cell leukemia/lymphoma</li>\n<li>Extranodal NK/T-cell lymphoma</li>\n<li>NK-cell leukemia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>5. Hodgkin's lymphoma</p>\n<ul>\n<li>Classic subtypes\n\t\t\t\t<ul>\n<li>Nodular sclerosis</li>\n<li>Mixed cellularity</li>\n<li>Lymphocyte-rich</li>\n<li>Lymphocyte depletion</li>\n</ul>\n</li>\n</ul>\n<ul>\n<li>Nodular <span class=\"customMeta\" data-dictid=\"c605d4126116927771916c2002638e\">lymphocyte</span> predominant</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with painless swelling of multiple lymph nodes in his neck and groin. He denies experiencing fever, night sweats, or weight loss. Physical examination reveals bilateral cervical and inguinal lymphadenopathy. Based on the Ann Arbor classification, what is this patient's most likely stage of disease?", "options": [{"label": "A", "text": "Stage I", "correct": false}, {"label": "B", "text": "Stage II", "correct": false}, {"label": "C", "text": "Stage III", "correct": true}, {"label": "D", "text": "Stage IV", "correct": false}], "correct_answer": "C. Stage III", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>STAGE</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>DISTRIBUTION OF DISEASE</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>I</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involvement of a single <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> region (I) or a single extra <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> organ or site (IE).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>II</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involvement of two or more <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> regions on the same side of the <span class=\"customMeta\" data-dictid=\"5b42867b61169277718692205c2447\">diaphragm</span> alone (II) or localised involvement of an extra <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> organ or site (IIE).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>III</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involvement of <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> regions on both sides of the <span class=\"customMeta\" data-dictid=\"5b42867b61169277718692205c2447\">diaphragm</span> without (III) or with (IIIE) localised involvement of an extra <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> organ or site.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IV</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse involvement of one or more extra <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> organs or sites with or without <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> involvement.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old male presents with painless enlargement of cervical lymph nodes, accompanied by fever, night sweats, and weight loss. Biopsy reveals large, atypical cells with prominent nucleoli and a mixed inflammatory background. Immunohistochemical staining shows these cells are negative for CD15 and CD30. Which marker is most likely to be positive in these cells?", "options": [{"label": "A", "text": "CD20", "correct": true}, {"label": "B", "text": "CD3", "correct": false}, {"label": "C", "text": "CD15", "correct": false}, {"label": "D", "text": "CD30", "correct": false}], "correct_answer": "A. CD20", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male with a history of HIV presents with fever, night sweats, and weight loss. A lymph node biopsy was done. Immunohistochemical staining shows these cells are CD15 and CD30 positive but CD20 negative. He was diagnosed with Lymphocyte-depleted Hodgkin's lymphoma. Which of the following features is characteristic of lymphocyte-depleted Hodgkin's lymphoma?", "options": [{"label": "A", "text": "Presence of fibrous bands", "correct": false}, {"label": "B", "text": "Abundance of reactive lymphocytes", "correct": false}, {"label": "C", "text": "High number of Reed-Sternberg cells", "correct": true}, {"label": "D", "text": "Predominance of nodular growth pattern", "correct": false}], "correct_answer": "C. High number of Reed-Sternberg cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/h00Tedyw3TOUZdSPbile1737025218.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old male presents with painless lymphadenopathy in the cervical region. A biopsy reveals the presence of numerous small lymphocytes with scattered large mononuclear Hodgkin and Reed-Sternberg cells, which are CD20 positive and CD15/CD30 negative. Which subtype of Hodgkin's lymphoma is most consistent with these findings?", "options": [{"label": "A", "text": "Nodular sclerosis Hodgkin lymphoma", "correct": false}, {"label": "B", "text": "Mixed cellularity Hodgkin lymphoma", "correct": false}, {"label": "C", "text": "Lymphocyte-rich Hodgkin lymphoma", "correct": true}, {"label": "D", "text": "Lymphocyte-depleted Hodgkin lymphoma", "correct": false}], "correct_answer": "C. Lymphocyte-rich Hodgkin lymphoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/XSXZD7qbrdEGfKGa8pxT1737024842.png", "https://image.prepladder.com/content/w1jvn2BEm07XlC0H2gk31737024924.png", "https://image.prepladder.com/content/1VbZKbE94VSXD6TsliB41737025003.png", "https://image.prepladder.com/content/ibE4G5SmQYrMsbezkUoW1737025103.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old male presents with painless swelling of multiple lymph nodes, fever, night sweats, and weight loss. A biopsy of the affected lymph node reveals the presence of Reed-Sternberg cells. Which of the following options regarding Mixed cellularity type Hodgkin’s Lymphoma is not true?", "options": [{"label": "A", "text": "It is characterised by frequent mononuclear and diagnostic Reed-Sternberg (RS) cells.", "correct": false}, {"label": "B", "text": "RS cells in this subtype typically express CD15 and CD30.", "correct": false}, {"label": "C", "text": "More than 70% of cases are Epstein-Barr virus (EBV) positive.", "correct": false}, {"label": "D", "text": "It is usually associated with a better prognosis than other subtypes of Hodgkin’s lymphoma.", "correct": true}], "correct_answer": "D. It is usually associated with a better prognosis than other subtypes of Hodgkin’s lymphoma.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old female presents with painless swelling in her neck and shortness of breath. Imaging studies reveal a large mediastinal mass. A biopsy of the lymph node shows frequent lacunar cells and Reed-Sternberg cells. The RS cells are positive for CD15 and CD30 and usually negative for EBV. Which subtype of Hodgkin's lymphoma is most likely?", "options": [{"label": "A", "text": "Nodular Sclerosis Classical Hodgkin Lymphoma", "correct": true}, {"label": "B", "text": "Nodular Lymphocyte-Predominant Hodgkin Lymphoma", "correct": false}, {"label": "C", "text": "Lymphocyte-Rich Classical Hodgkin Lymphoma", "correct": false}, {"label": "D", "text": "Lymphocyte-depleted classical Hodgkin Lymphoma", "correct": false}], "correct_answer": "A. Nodular Sclerosis Classical Hodgkin Lymphoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Tcg79kmXL4Hm2gLfu0mk1737024698.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following Cells Histopathology A) Popcorn cells 1) B) Lacunar cells 2) C) Mononuclear cells 3) D) Reed-sternberg cell 4)", "options": [{"label": "A", "text": "A-2, B-4, C-1, D-3", "correct": true}, {"label": "B", "text": "A-1, B-4, C-3, D-2", "correct": false}, {"label": "C", "text": "A-3, B-2, C-1, D-4", "correct": false}, {"label": "D", "text": "A-4, B-1, C-2, D-3", "correct": false}], "correct_answer": "A. A-2, B-4, C-1, D-3", "question_images": ["https://image.prepladder.com/content/CWtUbBNxmyMEOLFcx36t1737024582.png", "https://image.prepladder.com/content/wsisWsegHQ5VBbjPxDHx1737024367.png", "https://image.prepladder.com/content/mYZYYbISu2cTp0blMVzd1737683573.png", "https://image.prepladder.com/content/dc6qnTsqGkNhKgezoAeU1737024450.png"], "explanation_images": ["https://image.prepladder.com/content/kITaJUHMyAzKWHmiGNK41737024082.png", "https://image.prepladder.com/content/kGT5d0XNFXhwin6FrXxU1737023941.png", "https://image.prepladder.com/content/wzT2tzRTvahk2JovHofD1737683759.png", "https://image.prepladder.com/content/JQA532kx29EML11eENZj1737023998.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Histopathological variants of Hodgkin’s Lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mononuclear cells</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Emanuela Vaccher,Annunziata Gloghini,Caterina Volpi Antonino Carbone\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Hodgkin-lymphoma-HL-in-individuals-infected-by-HIV-Hodgkin-and-Reed-Sternberg-HRS_fig3_363317499\" data-tags=\"\" height=\"1717\" src=\"https://image.prepladder.com/content/kITaJUHMyAzKWHmiGNK41737024082.png\" width=\"1999\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>\n<h4>Single <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> with a large, inclusion-like <span class=\"customMeta\" data-dictid=\"63f221342216927771932b69aa421b\">nucleolus</span> with abundant cytoplasm.</h4>\n</li>\n<li>\n<h4>Seen in Mixed <span class=\"customMeta\" data-dictid=\"aed7aaaa4516927771844cded86cdb\">Cellularity</span> Hodgkin Lymphoma</h4>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Popcorn cells</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Nodular_lymphocyte_predominant_Hodgkin_lymphoma#/media/File:Popcorn_cell_in_nodular_lymphocyte_predominant_Hodgkin_lymphoma_-_very_high_mag_cropped.jpg\" data-tags=\"\" height=\"3076\" src=\"https://image.prepladder.com/content/kGT5d0XNFXhwin6FrXxU1737023941.png\" width=\"4167\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cells with multiple infolded nuclear membranes, small nucleoli, fine chromatin, and abundant pale cytoplasm.</li>\n<li>Seen in <span class=\"customMeta\" data-dictid=\"bfa856c77716927771939978c5afd0\">Nodular</span> <span class=\"customMeta\" data-dictid=\"c605d4126116927771916c2002638e\">lymphocyte</span> - Predominant Hodgkin lymphoma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reed-sternberg cell</strong></p>\n<img alt=\"\" data-author=\"Unknown author\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://en.wikipedia.org/wiki/Reed%E2%80%93Sternberg_cell\" data-tags=\"\" height=\"2655\" src=\"https://image.prepladder.com/content/wzT2tzRTvahk2JovHofD1737683759.png\" width=\"4167\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<h4>It is characterised by two nuclear lobes, large inclusion-like nucleoli, and abundant <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and is typically surrounded by lymphocytes, macrophages, and an eosinophil.</h4>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lacunar cells</strong></p>\n<p> </p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Mark ong\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:CHL_lacunar_cell_x40.jpg\" data-tags=\"\" height=\"1999\" src=\"https://image.prepladder.com/content/JQA532kx29EML11eENZj1737023998.png\" width=\"1509\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>\n<h4>Typically found in the <span class=\"customMeta\" data-dictid=\"bfa856c77716927771939978c5afd0\">nodular</span> <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">sclerosis</span> subtype.</h4>\n</li>\n<li>\n<h4>Nuclei are more delicate, folded, or multilobate.</h4>\n</li>\n<li>\n<h4>Abundant pale <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> often gets disrupted during sectioning, creating an appearance where the <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> sits in an empty space (lacuna).</h4>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:612px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Subtype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reed-Sternberg Cell Variant</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nodular <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">Sclerosis</span> (NSHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lacunar Cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mixed <span class=\"customMeta\" data-dictid=\"aed7aaaa4516927771844cded86cdb\">Cellularity</span> (MCHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnostic <span class=\"customMeta\" data-dictid=\"c2400eeeb21692777197329dbd745b\">Reed-Sternberg Cells</span> and <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">Mononuclear</span> Variants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphocyte-Rich (LRHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnostic <span class=\"customMeta\" data-dictid=\"c2400eeeb21692777197329dbd745b\">Reed-Sternberg Cells</span> and <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">Mononuclear</span> Variants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphocyte <span class=\"customMeta\" data-dictid=\"7061e0e0051692777186ba9c5f27df\">Depletion</span> (LDHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnostic <span class=\"customMeta\" data-dictid=\"c2400eeeb21692777197329dbd745b\">Reed-Sternberg Cells</span> and Variants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nodular Lymphocyte-Predominant (NLPHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphohistiocytic (L&H) Cells</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In the WHO classification of Hodgkin lymphoma, which marker is typically expressed in classical Hodgkin lymphoma?", "options": [{"label": "A", "text": "CD20", "correct": false}, {"label": "B", "text": "CD15", "correct": true}, {"label": "C", "text": "CD45", "correct": false}, {"label": "D", "text": "BCL-6", "correct": false}], "correct_answer": "B. CD15", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 30 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 45-year-old female presents with complaints of occasional headaches and blurred vision. Laboratory tests reveal isolated thrombocytosis without significant leukocytosis or erythrocytosis. Bone marrow biopsy shows increased megakaryocytes. Which of the following types of myeloproliferative neoplasm (MPN) is most likely to be diagnosed based on these findings?", "options": [{"label": "A", "text": "Polycythemia Vera (PV)", "correct": false}, {"label": "B", "text": "Essential Thrombocytosis (ET)", "correct": true}, {"label": "C", "text": "Chronic Myeloid Leukemia (CML)", "correct": false}, {"label": "D", "text": "Primary Myelofibrosis (PMF)", "correct": false}], "correct_answer": "B. Essential Thrombocytosis (ET)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Ppz6AuJ3ouvB65qFd1Tb1737044185.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old male presents with complaints of headaches, dizziness, and pruritus. Physical examination reveals a plethora and splenomegaly. Laboratory tests show elevated hemoglobin and hematocrit levels. Which of the following criteria are consistent with the Polycythemia Vera (PV) diagnosis?", "options": [{"label": "A", "text": "Sustained platelet count ≥ 450 x 10^9/L", "correct": false}, {"label": "B", "text": "Increased red blood cell mass", "correct": true}, {"label": "C", "text": "Presence of JAK2 mutation", "correct": false}, {"label": "D", "text": "Presence of CALR or MPL mutation", "correct": false}], "correct_answer": "B. Increased red blood cell mass", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old female presents to the clinic with complaints of frequent headaches, dizziness, and occasional burning pain in her hands and feet. Examination reveals splenomegaly. Her complete blood count shows a platelet count of 12,00,000/µL. The peripheral blood smear shows marked thrombocytosis with giant platelets. Which of the following is not true regarding this condition?", "options": [{"label": "A", "text": "Characterized by the presence of megakaryocytic hyperplasia.", "correct": false}, {"label": "B", "text": "Associated with JAK2, CALR, or MPL mutations.", "correct": false}, {"label": "C", "text": "Bone marrow biopsy typically shows increased reticulin fibrosis.", "correct": true}, {"label": "D", "text": "Increased risk of thrombotic and hemorrhagic events.", "correct": false}], "correct_answer": "C. Bone marrow biopsy typically shows increased reticulin fibrosis.", "question_images": ["https://image.prepladder.com/content/iWa5TcTiHgYFv97FiPOS1737044548.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old man presents with progressive fatigue and significant weight loss for the past six months. Examination reveals a markedly enlarged spleen. Peripheral blood smear shows teardrop-shaped red cells. Bone marrow biopsy confirms the diagnosis of primary myelofibrosis. Which of the following statements regarding the diagnosis is true? 1) It is characterized by extensive marrow fibrosis. 2) Diagnostic criteria include the presence of JAK2, CALR, or MPL mutations. 3) Pathogenesis involves the inappropriate release of fibrogenic factors like PDGF and TGF-β.", "options": [{"label": "A", "text": "All statements are true", "correct": true}, {"label": "B", "text": "1,2", "correct": false}, {"label": "C", "text": "Only 3", "correct": false}, {"label": "D", "text": "2,3", "correct": false}], "correct_answer": "A. All statements are true", "question_images": ["https://image.prepladder.com/content/SZ1PyeILdjrZuNu8rrzM1737044709.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old man presents with complaints of increasing fatigue, early satiety, and unintentional weight loss over the past few months. On examination, there is palpable splenomegaly. Laboratory reports reveal pancytopenia with dacrocytes on the peripheral smear. Which of the following is not associated with Myelofibrosis?", "options": [{"label": "A", "text": "Dry tap", "correct": false}, {"label": "B", "text": "Leukoerythroblastic blood picture", "correct": false}, {"label": "C", "text": "Dacrocytes", "correct": false}, {"label": "D", "text": "Myeloblasts", "correct": true}], "correct_answer": "D. Myeloblasts", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/xBvluRZLhewtffrJFdom1737044986.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 75-year-old man presents with increasing fatigue, weakness, and easy bruising over the past few months. Labs show pancytopenia. Peripheral blood smear reveals dysplastic differentiation in the erythroid, granulocytic, monocytic, and megakaryocytic lineages. Which condition does this suggest?", "options": [{"label": "A", "text": "Hyperlobated megakaryocyte", "correct": false}, {"label": "B", "text": "Leukoerythroblastic picture", "correct": false}, {"label": "C", "text": "Increased proliferation of RBCs", "correct": false}, {"label": "D", "text": "Pawn ball megakaryocyte", "correct": true}], "correct_answer": "D. Pawn ball megakaryocyte", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/yloymRtdzQrf5YtpMjFP1737045793.png", "https://image.prepladder.com/content/x4ZnpX8GOjx8VqBcOJvr1737045173.png", "https://image.prepladder.com/content/PH4FQgLbTUFNUu5HSS301737045324.png", "https://image.prepladder.com/content/W7xY41ydtAarR4Zv5xq01737045423.png", "https://image.prepladder.com/content/NwGX8AxC7DdphEchTbMw1737045524.png", "https://image.prepladder.com/content/w4Rx4rglzlOCurMe2nvE1737045608.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old child presents with a skin rash, recurrent ear infections, bone pain, and polyuria. Imaging revealed lytic bone lesions and a biopsy of one of the lesions showed CD1a and S-100 positive Langerhans cells. Which of the following types of Langerhans cell histiocytosis (LCH) is characterized by multifocal uni system involvement?", "options": [{"label": "A", "text": "Eosinophilic granuloma", "correct": false}, {"label": "B", "text": "Hand-Schüller-Christian disease", "correct": true}, {"label": "C", "text": "Letterer-Siwe disease", "correct": false}, {"label": "D", "text": "Both A and C", "correct": false}], "correct_answer": "B. Hand-Schüller-Christian disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/lD9E7NUwBIffdONnUEpO1737046235.png", "https://image.prepladder.com/content/SFVdA2DcNgOdDUv1JWnZ1737046300.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:643px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Eosinophilic granuloma</strong></p>\n<p style=\"text-align: center;\"><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Hand-Schuller-Christian disease</strong><strong> (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Letterer-Siwe disease</strong></p>\n<p style=\"text-align: center;\"><strong>(Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Unifocal involvement.</li>\n<li>Primarily involves <span class=\"customMeta\" data-dictid=\"d54da38aaa1692777191560f60c0f9\">lytic</span> bone lesions.</li>\n<li>Seen in young children.</li>\n</ul>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Multifocal involvement.</li>\n<li>It is characterized by a <span class=\"customMeta\" data-dictid=\"1a0a43d74e16927772004473a05ae3\">triad</span> of symptoms such as:\n\t\t\t\t<ul>\n<li>Bony lesions in a calvarial defect.</li>\n<li>Diabetes insipidus and</li>\n<li>Exophthalmos.</li>\n</ul>\n</li>\n</ul>\n</td>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It is a more severe, <span class=\"customMeta\" data-dictid=\"f4006059f916927771865569d4da7d\">disseminated</span> <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of LCH with multisystem involvement.</li>\n<li>It is characterized by <span class=\"customMeta\" data-dictid=\"d54da38aaa1692777191560f60c0f9\">lytic</span> bony lesions and <span class=\"customMeta\" data-dictid=\"5d5241c3cf1692777198a1ba71f8d4\">seborrheic</span> dermatitis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 17 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following images shows the typical features of a plasma cell in a histopathological examination (HPE) of bone marrow?", "options": [{"label": "A", "text": "No options available", "correct": true}], "correct_answer": "A. No options available", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/7spp0OQ6MmpUj3scdsaw1737053365.png", "https://image.prepladder.com/content/NxfxxezW1bdol54vryb61737053452.png", "https://image.prepladder.com/content/hFOKBNcoMXylOkAaxRoq1737053520.png", "https://image.prepladder.com/content/UvkqdFXPriiwf2eo5YCk1737053579.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:727px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HPE image</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Explanation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Plasma cell</p>\n<p><img alt=\"\" data-author=\"No machine-readable author , KGH assumed\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Multiple_myeloma\" data-tags=\"\" height=\"450\" src=\"https://image.prepladder.com/content/7spp0OQ6MmpUj3scdsaw1737053365.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ovoid cells with deep blue cytoplasm.</li>\n<li>Pale <span class=\"customMeta\" data-dictid=\"2da8fc47cf169277719576cea1851f\">perinuclear</span> area (halo)/hoff made of Golgi <span class=\"customMeta\" data-dictid=\"5a70fb96bf1692777181823f42fcf0\">apparatus</span> (help in <span class=\"customMeta\" data-dictid=\"c087dfa48f1692777180b90ca2237f\">Ab</span> production, which are proteins).</li>\n<li>Eccentric <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">Nucleus</span> with <span class=\"customMeta\" data-dictid=\"28606fa66a169277718407469e7e7c\">coarse</span> <span class=\"customMeta\" data-dictid=\"77399c6ee0169277718492fb8fd58f\">chromatin</span> arranged in a clock face (cartwheel) pattern.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Osteoblast</p>\n<p><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Osteoblast\" data-tags=\"\" height=\"500\" src=\"https://image.prepladder.com/content/NxfxxezW1bdol54vryb61737053452.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Eccentric <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> with a pale area away from the <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> containing the Golgi <span class=\"customMeta\" data-dictid=\"5a70fb96bf1692777181823f42fcf0\">apparatus</span> <strong>(para-nuclear halo/hoff). </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibroblast</p>\n<p><img alt=\"\" data-author=\"SubtleGuest \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Fibroblast\" data-tags=\"\" height=\"334\" src=\"https://image.prepladder.com/content/hFOKBNcoMXylOkAaxRoq1737053520.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Spindle-shaped cells with round nucleus.</li>\n<li>Cells and their <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> <span class=\"customMeta\" data-dictid=\"14958c535b1692777192abd2a85abf\">matrix</span> products (fibres and <span class=\"customMeta\" data-dictid=\"837f5783cf1692777181d8a586fd8c\">amorphous</span> ground substance) maintain the structural integrity of <span class=\"customMeta\" data-dictid=\"67e237a57c16927771859803f93ab3\">connective</span> tissues and play key roles in <span class=\"customMeta\" data-dictid=\"9cf83937931692777188a014337dcf\">healing</span> processes.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mast Cell</p>\n<p><img alt=\"\" data-author=\"Vortioxetine \" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Mast_cell\" data-tags=\"\" height=\"297\" src=\"https://image.prepladder.com/content/UvkqdFXPriiwf2eo5YCk1737053579.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Oval-shaped with dense, <span class=\"customMeta\" data-dictid=\"4f63eb15be169277718848d4b4978b\">granular</span> <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and a central, single nucleus.</li>\n<li>Play a key role in <span class=\"customMeta\" data-dictid=\"ebcb7136251692777201ef4b5c5718\">Type 1</span> <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> reactions.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old woman presents with 6 months of persistent fatigue, lower back pain and recurrent infections. Laboratory tests show hypercalcemia, elevated creatinine, and normocytic anemia. Serum protein electrophoresis indicates a monoclonal spike. Bone marrow biopsy shows atypical plasma cells with eccentric nuclei and perinuclear halos, as shown in the image below. Which of the following cytogenetic abnormalities is not typically associated with this condition?", "options": [{"label": "A", "text": "Deletion of chromosome 13q", "correct": false}, {"label": "B", "text": "Translocation t(11;14)", "correct": false}, {"label": "C", "text": "Trisomy 21", "correct": true}, {"label": "D", "text": "Deletion of chromosome 17p", "correct": false}], "correct_answer": "C. Trisomy 21", "question_images": ["https://image.prepladder.com/content/l8K9pXJIFr46j9PctohP1737053744.png"], "explanation_images": ["https://image.prepladder.com/content/cg46wMi4J3qg5Sv3y0mO1737053853.png", "https://image.prepladder.com/content/697pcDgJpC6XDMCpB35N1737654081.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Monoclonal Immunoglobulins</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Free Light Chains</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>IgG: Most common (55% of patients).</li>\n<li>IgA: Seen in 25% of cases.</li>\n<li>IgM, IgD, IgE: Less common.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Often produced in excess, called Bence Jones proteins.</li>\n<li>Can cause <span class=\"customMeta\" data-dictid=\"aa6a0dfcb61692777193561ed10fac\">myeloma</span> <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">kidney</span> (renal disease).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 68-year-old man presents with complaints of persistent bone pain, particularly in his lower back and ribs, along with fatigue and recurrent infections over the past few months. Further workup demonstrates Bence Jones proteinuria. What temperature does it precipitate at?", "options": [{"label": "A", "text": "100°C", "correct": false}, {"label": "B", "text": "60°C", "correct": true}, {"label": "C", "text": "0°C", "correct": false}, {"label": "D", "text": "30°C", "correct": false}], "correct_answer": "B. 60°C", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ZaoFOrJXjB7yjWyorgIc1737054105.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old woman presents with bone pain, recurrent infections, elevated serum calcium levels, renal dysfunction, and anaemia. Laboratory tests reveal an M spike on serum protein electrophoresis and the presence of Bence Jones proteins in the urine. Based on this presentation, which of the following is not a criterion for a myeloma-defining event in the diagnostic criteria for this condition?", "options": [{"label": "A", "text": "Hypercalcemia", "correct": false}, {"label": "B", "text": "Anemia", "correct": false}, {"label": "C", "text": "Renal failure", "correct": false}, {"label": "D", "text": "Bence jones proteinuria", "correct": true}], "correct_answer": "D. Bence jones proteinuria", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:608px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnostic Criteria for Multiple Myeloma:</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:608px\">\n<ul>\n<li>≥10% clonal <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells (or)<strong> </strong>a biopsy-proven bony or extra <span class=\"customMeta\" data-dictid=\"0a36e18386169277719259641cf29b\">medullary</span> plasmacytoma </li>\n</ul>\n<p> <strong> + (PLUS)</strong></p>\n<ul>\n<li><strong>Evidence of one or more <span class=\"customMeta\" data-dictid=\"652999e42416927771936e1f3246e3\">multiple myeloma</span> defining events (MDE):</strong> (CRAB features)\n\n\t\t\t\t<ul>\n<li>Hyper<strong>C</strong>alcemia <strong>(S.Ca2+ >11g/dl)</strong><strong> </strong><strong>(Option A)</strong></li>\n<li><strong>R</strong>enal failure <strong>(S. <span class=\"customMeta\" data-dictid=\"2ead0fd0301692777185187bd72768\">Creatinine</span> >2mg/dl) </strong><strong>(Option C)</strong></li>\n<li><strong>A</strong>naemia <strong>(Hb <10gm)</strong><strong> </strong><strong>(Option B)</strong></li>\n<li>Lytic <strong>B</strong>one lesions are attributable to the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell disorder.</li>\n</ul>\n</li>\n</ul>\n<p> <strong> (OR)</strong></p>\n<ul>\n<li>One or more biomarkers of <span class=\"customMeta\" data-dictid=\"0c7efd2b8716927771914c8cb19e54\">malignancy</span> (SLIM criteria)\n\t\t\t\t<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> clonal plasmacytosis<strong> </strong><strong>≥60%</strong> (<strong>S</strong>ixty per cent)</li>\n<li>Serum involved/uninvolved free <strong>Li</strong>ght chain (FLC) ratio<strong> </strong><strong>≥ 100</strong> (provided involved FLC is ≥100 mg/L)</li>\n<li><strong>>1</strong> <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> on<strong> M</strong>RI.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70-year-old woman is being evaluated for monoclonal gammopathy. Bone marrow examination showed abnormal proliferation of plasma cells with evidence of certain microscopic features. Match the following structures with corresponding histopathological images regarding this condition. 1. Flame Cell a) 2. Mott cell b) 3. Russel bodies c) 4. Dutcher bodies d)", "options": [{"label": "A", "text": "1-d; 2-a; 3-c; 4-b", "correct": false}, {"label": "B", "text": "1-d; 2-c; 3-a; 4-b", "correct": true}, {"label": "C", "text": "1-c; 2-d; 3-a; 4-b", "correct": false}, {"label": "D", "text": "1-c; 2-d; 3-b; 4-a", "correct": false}], "correct_answer": "B. 1-d; 2-c; 3-a; 4-b", "question_images": ["https://image.prepladder.com/content/I1TT1VzB2RT4HCYi1Hd91737654850.png", "https://image.prepladder.com/content/HTmRlGMknFypZDhzFaLs1737654871.png", "https://image.prepladder.com/content/EIAjJV3CTicnVQ0FTa8k1737654828.png", "https://image.prepladder.com/content/0zKCs657RmmOJkqBTMmu1737654772.png"], "explanation_images": ["https://image.prepladder.com/content/OC6lE5cRtSRvDMoUVhTA1737084252.png", "https://image.prepladder.com/content/00Fr1ajjYfDCBxRMadFa1737084311.png", "https://image.prepladder.com/content/hS0tSgXRn8oU4op6o3me1737084370.png", "https://image.prepladder.com/content/bVdoedfKhgYLUpnYESkg1737084427.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>INCLUSION BODIES SEEN IN MULTIPLE MYELOMA</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Russel bodies</strong></p>\n<p><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Russell_bodies_2_high_mag_mini.jpg\" data-tags=\"\" height=\"315\" src=\"https://image.prepladder.com/content/OC6lE5cRtSRvDMoUVhTA1737084252.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Location:</strong> Intracytoplasmic</li>\n<li><strong>Composition:</strong></li>\n<li>Eosinophilic</li>\n<li>Round</li>\n<li>Dilated <span class=\"customMeta\" data-dictid=\"c01a5a8c221692777187daa368ab62\">endoplasmic reticulum</span> <span class=\"customMeta\" data-dictid=\"11900fa000169277718475f5b54b45\">cisternae</span> filled with condensed immunoglobulin.</li>\n</ul>\n<p>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dutcher bodies</strong></p>\n<p><img alt=\"\" data-author=\"Gabriel Caponetti\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Dutcher_and_Russell_bodies.jpg\" data-tags=\"\" height=\"392\" src=\"https://image.prepladder.com/content/00Fr1ajjYfDCBxRMadFa1737084311.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Location:</strong> Intranuclear.</li>\n<li><strong>Composition:</strong> <span class=\"customMeta\" data-dictid=\"7fb01b5ad51692777188c3cb1733f9\">Globular</span> inclusions containing accumulated immunoglobulin.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PLASMA CELL VARIANTS IN MULTIPLE MYELOMA</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mott cells</strong></p>\n<p><img alt=\"\" data-author=\"Prof. Osaro Erhabor\" data-hash=\"\" data-license=\"CC0 \" data-source=\"https://commons.wikimedia.org/wiki/File:Mott_Cell.jpg\" data-tags=\"\" height=\"330\" src=\"https://image.prepladder.com/content/hS0tSgXRn8oU4op6o3me1737084370.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Contain Grape-like cytoplasmic droplets.</li>\n<li><strong>Composition: </strong>Inclusion bodies, fibrils, <span class=\"customMeta\" data-dictid=\"35b1a3c6191692777185a1e2376fc0\">crystalline</span> rods, and globules.</li>\n</ul>\n<br/>\n\t\t\t </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Flame cells</strong></p>\n<p><img alt=\"\" data-author=\"University of Alberta\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://pressbooks.openeducationalberta.ca/mlsci/chapter/plasma-cell-myeloma-multiple-myeloma/, https://pressbooks.openeducationalberta.ca/app/uploads/sites/3/2018/08/0472FlameCell100x2-Gloria-Kwon-ARROW.jpg\" data-tags=\"\" height=\"397\" src=\"https://image.prepladder.com/content/bVdoedfKhgYLUpnYESkg1737084427.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Appearance</strong>: Fiery red cytoplasm.</li>\n<li><strong>Cause</strong>: High concentration of <span class=\"customMeta\" data-dictid=\"f8fab286571692777189bdfd087071\">immunoglobulin</span> as bright red granules within the cytoplasm.</li>\n<li>Often seen in <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> subtype myeloma.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents with fatigue, bone pain, and recurrent infections. Laboratory tests show elevated IL-6 and beta-2 microglobulin levels, while imaging reveals multiple lytic bone lesions. Bone marrow biopsy showed a high percentage of plasma cells, and cytogenetic analysis revealed a deletion of chromosome 17p. Flow cytometry is performed to distinguish abnormal plasma cells from normal ones in this patient. Which marker commonly shows increased expression on plasma cells in multiple myeloma, aiding in this differentiation?", "options": [{"label": "A", "text": "CD19", "correct": false}, {"label": "B", "text": "CD38", "correct": false}, {"label": "C", "text": "CD56", "correct": true}, {"label": "D", "text": "CD117", "correct": false}], "correct_answer": "C. CD56", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/FcIv3dq5SGy047Vq1aNo1737084588.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:561px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Normal <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Multiple <span class=\"customMeta\" data-dictid=\"aa6a0dfcb61692777193561ed10fac\">myeloma</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD19</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>+</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD45</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>+</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CD 38</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>+</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>+</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CD138</strong></p>\n<p><strong>(Syndecan-1)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>+</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>+</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CD56</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>+</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 68-year-old man presents with fatigue, bone pain, and recurrent infections. Laboratory tests reveal hypercalcemia and increased beta-2 microglobulin; imaging shows multiple lytic bone lesions. Which biochemical test is most commonly used to assess renal function and evaluate kidney damage in patients with multiple myeloma?", "options": [{"label": "A", "text": "Serum protein electrophoresis (SPEP)", "correct": false}, {"label": "B", "text": "Serum creatinine levels", "correct": true}, {"label": "C", "text": "Serum calcium levels", "correct": false}, {"label": "D", "text": "Urine protein electrophoresis", "correct": false}], "correct_answer": "B. Serum creatinine levels", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 62-year-old male with a routine health check-up is found to have a serum M protein level of 3.5 g/dL and plasma cells making up 25% of the marrow cellularity. He reports no bone pain, normal kidney function, normal calcium levels, and no lytic bone lesions on imaging. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Monoclonal Gammopathy of Undetermined Significance (MGUS)", "correct": false}, {"label": "B", "text": "Plasma Cell Leukemia", "correct": false}, {"label": "C", "text": "Multiple Myeloma", "correct": false}, {"label": "D", "text": "Smouldering Myeloma", "correct": true}], "correct_answer": "D. Smouldering Myeloma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Criteria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>MGUS</strong> (most common <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell abnormality)</p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Plasma Cell Leukemia</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Multiple Myeloma</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Smouldering Myeloma</strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Serum M Protein Level</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Typically < 3 g/dL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Variable</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Variable, often > 3 g/dL</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>> 3 g/dL</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Plasma Cells in Bone Marrow</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>< 10%</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Variable</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Variable, often > 10%</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>10% to 30%</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Symptoms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Present</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Present (bone pain, anemia, hypercalcemia)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Absent</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Organ Damage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Present</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Present (renal impairment, bone lesions)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Absent</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Risk of <span class=\"customMeta\" data-dictid=\"3c305b384216927771969ca4166493\">Progression</span> to MM</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Intermediate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Observation</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Chemotherapy, stem cell transplant</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Chemotherapy, immunotherapy, stem cell transplant</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Observation or clinical trials</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Favourable</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Poor</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Variable</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Intermediate</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70-year-old male presents with blurred vision, dizziness, and epistaxis. Physical examination reveals engorged retinal veins and signs of haemorrhage. Laboratory tests show an elevated serum viscosity. Serum protein electrophoresis reveals a monoclonal IgM spike. What is the most likely cause of the patient's symptoms?", "options": [{"label": "A", "text": "Multiple Myeloma", "correct": false}, {"label": "B", "text": "Chronic Lymphocytic Leukemia", "correct": false}, {"label": "C", "text": "IgA Myeloma", "correct": false}, {"label": "D", "text": "Waldenstrom’s Macroglobulinemia", "correct": true}], "correct_answer": "D. Waldenstrom’s Macroglobulinemia", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presents with recurrent infections and fatigue. Laboratory tests show hypogammaglobulinemia and serum protein electrophoresis reveals an absence of normal immunoglobulins but a monoclonal spike in the gamma region. Bone marrow biopsy reveals large lymphoid cells with intracytoplasmic inclusions. Which type of heavy chain disease is most likely causing the patient's symptoms?", "options": [{"label": "A", "text": "Alpha Heavy Chain Disease", "correct": false}, {"label": "B", "text": "Gamma Heavy Chain Disease", "correct": true}, {"label": "C", "text": "Mu Heavy Chain Disease", "correct": false}, {"label": "D", "text": "Delta Heavy Chain Disease", "correct": false}], "correct_answer": "B. Gamma Heavy Chain Disease", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is a possible explanation for the presence of pancytopenia as indicated by the blood examination results? A. Megaloblastic anemia B. Hairy cell leukemia C. MDS with hypocellular BM D. APML", "options": [{"label": "A", "text": "B, D", "correct": false}, {"label": "B", "text": "A, B, C", "correct": true}, {"label": "C", "text": "B, C, D", "correct": false}, {"label": "D", "text": "A, B, D", "correct": false}], "correct_answer": "B. A, B, C", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old male presents with easy fatigability, back pain, and multiple lytic lesions in the skull. The bone marrow biopsy finding is given below. What is the most probable diagnosis?", "options": [{"label": "A", "text": "CML (Chronic Myelogenous Leukemia)", "correct": false}, {"label": "B", "text": "CLL (Chronic Lymphocytic Leukemia)", "correct": false}, {"label": "C", "text": "Multiple Myeloma", "correct": true}, {"label": "D", "text": "Hairy Cell Leukemia", "correct": false}], "correct_answer": "C. Multiple Myeloma", "question_images": ["https://image.prepladder.com/content/MSHEQaEhh9wfR1Th3OrQ1747908773.png"], "explanation_images": ["https://image.prepladder.com/content/kPTyA7skoNKIniJdWWBX1746084612.png", "https://image.prepladder.com/content/F5qpOTOZpWIGG4GG8mH51746084612.png", "https://image.prepladder.com/content/u8UfltRr3XrSkD7rMpMl1746084612.png", "https://image.prepladder.com/content/YsPuaoJATxZvSdXOZoU91747908834.png", "https://image.prepladder.com/content/6U8W06w9UL1WD6QHHb9r1747908843.png", "https://image.prepladder.com/content/KdtRSdKA0h8sCJM9QVtK1747908854.png", "https://image.prepladder.com/content/jQGiq8wOoyEH2S9sCZ7y1746084652.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Inclusion Bodies seen in Multiple Myeloma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Russel bodies:</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Russell_bodies_2_high_mag_mini.jpg\" data-tags=\"\" height=\"2625\" src=\"https://image.prepladder.com/content/YsPuaoJATxZvSdXOZoU91747908834.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Location:</strong> Intracytoplasmic</li>\n<li><strong>Composition:</strong> Intracytoplasmic, eosinophilic, round inclusions formed by dilated <span class=\"customMeta\" data-dictid=\"c01a5a8c221692777187daa368ab62\">endoplasmic reticulum</span> <span class=\"customMeta\" data-dictid=\"11900fa000169277718475f5b54b45\">cisternae</span> filled with condensed immunoglobulins.</li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Dutcher bodies</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Gabriel Caponetti\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Dutcher_and_Russell_bodies.jpg\" data-tags=\"\" height=\"3265\" src=\"https://image.prepladder.com/content/6U8W06w9UL1WD6QHHb9r1747908843.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Location:</strong> Intranuclear.</li>\n<li><strong>Composition:</strong> Globular inclusions containing accumulated immunoglobulin.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\"><strong>Plasma cell Variants in Multiple Myeloma</strong></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mott cells</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Prof. Osaro Erhabor\" data-hash=\"\" data-license=\"CC0 \" data-source=\"https://commons.wikimedia.org/wiki/File:Mott_Cell.jpg\" data-tags=\"\" height=\"2751\" src=\"https://image.prepladder.com/content/KdtRSdKA0h8sCJM9QVtK1747908854.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Contain Grape-like cytoplasmic droplets.</li>\n<li><strong>Composition: </strong>Inclusion bodies, fibrils, <span class=\"customMeta\" data-dictid=\"35b1a3c6191692777185a1e2376fc0\">crystalline</span> rods, and globules.</li>\n</ul>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Flame cells</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"University of Alberta\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://pressbooks.openeducationalberta.ca/mlsci/chapter/plasma-cell-myeloma-multiple-myeloma/,\" data-tags=\"\" height=\"310\" src=\"https://image.prepladder.com/content/jQGiq8wOoyEH2S9sCZ7y1746084652.png\" width=\"390\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Appearance</strong>: Fiery red cytoplasm.</li>\n<li><strong>Cause</strong>: High concentration of <span class=\"customMeta\" data-dictid=\"f8fab286571692777189bdfd087071\">immunoglobulin</span> as bright red granules within the cytoplasm.</li>\n<li>Often seen in<strong> </strong><strong>IgA subtype myeloma.</strong></li>\n</ul>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the likely diagnosis for a 10-year-old boy with Down syndrome who presents with a mediastinal mass (SVC-like syndrome), based on the provided bone marrow histology shown below?", "options": [{"label": "A", "text": "AML (Acute Myeloid Leukemia)", "correct": false}, {"label": "B", "text": "Aplastic anemia", "correct": false}, {"label": "C", "text": "ALL (Acute Lymphoblastic Leukemia)", "correct": true}, {"label": "D", "text": "Juvenile Myelomonocytic Leukemia (JMML)", "correct": false}], "correct_answer": "C. ALL (Acute Lymphoblastic Leukemia)", "question_images": ["https://image.prepladder.com/content/EsQrmMLk54UGawCyzAdG1746091051.png"], "explanation_images": ["https://image.prepladder.com/content/0fUPNKRgO0RA9V8qyx3w1746091109.png", "https://image.prepladder.com/content/7PuQyBN0Wpwj5cviZp591746091109.png", "https://image.prepladder.com/content/wLAiInxbg4NHzXJhTBMP1746091109.png", "https://image.prepladder.com/content/Z8HoAeyGAqAybIEnzaAo1746091109.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"VashiDonsk\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Acute_leukemia-ALL.jpg\" data-tags=\"\" height=\"331\" src=\"https://image.prepladder.com/content/0fUPNKRgO0RA9V8qyx3w1746091109.png\" width=\"443\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Acute Lymphoblastic <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">Leukemia</span> (ALL)</strong></p>\n<ul>\n<li><strong>Lymphoblasts in <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> >=20%</strong></li>\n<li><strong>Cytoplasmic vacuolations</strong></li>\n<li>They contain fat (Oil Red O Positive)</li>\n<li><strong>Hand mirror-shaped cells</strong></li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"The Armed Forces Institute of Pathology\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:Faggot_cell_in_AML-M3.jpg\" data-tags=\"\" height=\"344\" src=\"https://image.prepladder.com/content/7PuQyBN0Wpwj5cviZp591746091109.png\" width=\"407\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Acute Myeloid <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">Leukemia</span> (AML) </strong></p>\n<ul>\n<li>Blasts ≥ 20%</li>\n<li><strong>Myeloblasts with AuerRods </strong></li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"The Armed Forces Institute of Pathology\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:B-cell_chronic_lymphocytic_leukemia_(B-CLL).jpg\" data-tags=\"\" height=\"347\" src=\"https://image.prepladder.com/content/wLAiInxbg4NHzXJhTBMP1746091109.png\" width=\"433\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Chronic Lymphocytic <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">Leukemia</span> (CLL):</strong></p>\n<ul>\n<li><strong>Smudge cells</strong> (or parachute/basket cell): Due to the <span class=\"customMeta\" data-dictid=\"0f4e78e9121692777203594ba840cc\">fragility</span> of lymphocytes during slide preparation</li>\n<li><strong>Convent Girl Appearance:</strong> Lot of homogenous, small, mature-like, round lymphocytes with scant cytoplasm</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Chronic_myelogenous_leukemia#/media/File:Chronic_Myeloid_Leukemia_smear_2009-04-09.JPG\" data-tags=\"\" height=\"351\" src=\"https://image.prepladder.com/content/Z8HoAeyGAqAybIEnzaAo1746091109.png\" width=\"412\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Chronic Myeloid <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">Leukemia</span> (CML)</strong></p>\n<ul>\n<li>Leukocytosis</li>\n<li>Cell Types: Neutrophils( multilobed nucleus), metamyelocytes (indented nucleus), myelocytes (D-shaped nucleus), and eosinophils (orange cells)</li>\n<li><strong>College girl/garden party appearance: </strong>Due to the variety of cell appearances</li>\n<li><strong>Shift to the Left:</strong> Presence of <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> cell types, mainly <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> neutrophils, in the blood.</li>\n</ul>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old patient presented with scrotal swelling and ataxia. Which among the following could likely be a cause?", "options": [{"label": "A", "text": "Glioblastoma multiforme", "correct": false}, {"label": "B", "text": "Hodgkin lymphoma", "correct": false}, {"label": "C", "text": "Non-Hodgkin lymphoma", "correct": true}, {"label": "D", "text": "Non seminomatous germ cell tumor", "correct": false}], "correct_answer": "C. Non-Hodgkin lymphoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Hodgkin lymphoma</strong></p>\n<p><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Non-Hodgkin lymphoma</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Age of presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bimodal distribution</strong> peaks in young adults (15-35 years) and older adults (over 55).</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>More common in older adults</strong> but can occur at any age.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Localization </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>More often localised to a <strong>single <span class=\"customMeta\" data-dictid=\"01591f7f591692777182ef8aa2360c\">axial</span> group of nodes</strong> (cervical, mediastinal, para-aortic)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>More frequent involvement of <strong>multiple <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> nodes</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Malignant cells </strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Reed-Sternberg cells (owl eye cells) - B cells - induce <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and fibrosis</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Lymphoid cells - many subtypes - most are B cells than T cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mass composition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Inflammatory cells and <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> (reactive cells)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Lymphoid cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Painless lymphadenopathy</li>\n<li><strong>B symptoms</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Painless lymphadenopathy</li>\n<li><strong>Mesenteric nodes and Waldeyer ring are involved.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Spread </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Contiguous (touching); rarely extranodal</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Diffuse; often extranodal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Staging </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Guides therapy</li>\n<li>Radiation mainstay treatment</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Limited importance</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Leukemic phase </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Doesn't occur</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Occurs</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which cell is the origin of chronic lymphocytic leukaemia / small lymphocytic lymphoma?", "options": [{"label": "A", "text": "Naive B cells", "correct": true}, {"label": "B", "text": "Mature T cells", "correct": false}, {"label": "C", "text": "Progenitor T cells", "correct": false}, {"label": "D", "text": "Granulocytes", "correct": false}], "correct_answer": "A. Naive B cells", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient with lytic lesions on the skull is suspected of a diagnosis of Langerhans cell histiocytosis. Which of the following is a characteristic finding of electron microscopy?", "options": [{"label": "A", "text": "Histiocytes", "correct": false}, {"label": "B", "text": "Birbeck granules", "correct": true}, {"label": "C", "text": "Eosinophils", "correct": false}, {"label": "D", "text": "Giant cells", "correct": false}], "correct_answer": "B. Birbeck granules", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/wqipVHD8M9Q2f4WoJy0o1745577225.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-year-old boy came with bilateral cervical lymphadenopathy. What is the probable diagnosis, cell, and virus associated with the image given below? RS cell: Reed Stemberg cell HIV: Human immunodeficiency virus CMV: Cytomegalovirus EBV: Epstein–Barr virus", "options": [{"label": "A", "text": "Non-Hodgkin’s lymphoma, RS cell, EBV", "correct": false}, {"label": "B", "text": "Kaposi sarcoma, Giant cell, HIV", "correct": false}, {"label": "C", "text": "Hodgkin’s lymphoma, RS cell, EBV", "correct": true}, {"label": "D", "text": "Infectious mononucleosis, RS cell, CMV", "correct": false}], "correct_answer": "C. Hodgkin’s lymphoma, RS cell, EBV", "question_images": ["https://image.prepladder.com/content/hDTn3AhTUP4JihRMqGmm1745577309.png"], "explanation_images": ["https://image.prepladder.com/content/fwXKhwZImDTTrUhsFxy31745577349.png", "https://image.prepladder.com/notes/R5aIrvCYTemfYZdc5One1747111315.png", "https://image.prepladder.com/content/4Slh6O7m29KSOW7IIDVD1745577350.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:900px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Hodgkin's <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">Lymphoma</span> (HL)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Etiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>M ore common in whites & Males.</li>\n<li>Bimodal age distribution with peaks in the 20s and 80s.</li>\n<li>It is not a part of AIDS-defining lymphoma.</li>\n<li><strong>Risk Factors</strong>:\n\t\t\t\t<ul>\n<li> HIV infection is a major risk factor.</li>\n<li>Epstein-Barr virus (EBV). <strong>(Option C)</strong></li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Reed-Sternberg (HRS) Cells</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>HRS cells are derived from the <span class=\"customMeta\" data-dictid=\"a0e5fdc156169277718879843a6ede\">germinal</span> <span class=\"customMeta\" data-dictid=\"1feb2a0a3016927771847db9449f75\">centre</span> or post-germinal <span class=\"customMeta\" data-dictid=\"1feb2a0a3016927771847db9449f75\">centre</span> B cells (mature B cells in <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> nodes).</li>\n<li>Diagnostic of HL.</li>\n<li>Large, with abundant cytoplasm, bilobed or multinucleated.</li>\n<li>Typically positive for<strong> PAX-5, CD15, and CD30. </strong></li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Unknown\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://en.wikipedia.org/wiki/Reed%E2%80%93Sternberg_cell\" data-tags=\"\" height=\"257\" src=\"https://image.prepladder.com/content/fwXKhwZImDTTrUhsFxy31745577349.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>NF-κB Activation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Common in cHL, promoting RS cell growth and survival.</li>\n<li><strong>EBV+ Tumors</strong>: <strong>Express <span class=\"customMeta\" data-dictid=\"cec2565ecd1692777191eed58869b2\">latent</span> <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> protein-1 (LMP-1)</strong>, which activates NF-κB.</li>\n<li><strong>EBV− Tumors</strong>: NF-κB <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> may result from<strong> loss-of-function mutations in IκB or <span class=\"customMeta\" data-dictid=\"679634d4541692777191db4e3ade84\">loss-of-function mutation</span> of TNF-α–induced protein </strong>3, both of which normally <span class=\"customMeta\" data-dictid=\"6b3de87b7c16927771901326efbcd2\">inhibit</span> NF-κB.</li>\n<li>NF-κB <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> may rescue \"crippled\" B cells that can't express Ig, <strong>preventing apoptosis</strong> and enabling further mutations that <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> RS cells.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Immune Evasion</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Genetic abnormalities at the<strong> PD-L1 locus</strong> on <strong>chromosome 9p24.1</strong> lead to PD-L1 overexpression, which helps the tumour evade immune detection.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old male has been complaining of fatigue for the past year. The examination revealed massive splenomegaly. His blood workup shows the presence of anemia, TLC 150,000/microL, and PBS shows 60% neutrophils, 6% basophils, 4% eosinophils, myeloblasts, myelocytes, and metamyelocytes. The myeloid-to-erythroid ratio was 18:1. Which of the following is the most sensitive investigation in this case?", "options": [{"label": "A", "text": "Immunophenotyping", "correct": false}, {"label": "B", "text": "LAP score", "correct": false}, {"label": "C", "text": "FISH and PCR", "correct": true}, {"label": "D", "text": "Flow cytometry", "correct": false}], "correct_answer": "C. FISH and PCR", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/lUVaOefkGAKVYS0gsxty1745406603.png", "https://image.prepladder.com/content/VpSalZFvwAeXha83j9kP1745406612.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:664px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Investigations to find CML</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>CBC</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Normal RBC + <strong>Elevated TLC + Elevated platelets </strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Peripheral smear</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Left shift with predominant segmented neutrophils, myelocytes, and metamyelocytes.</li>\n<li><strong>College girl/garden party appearance.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> aspirate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Increased</strong> Myeloid: Erythroid ratio.</li>\n<li><strong>Dwarf megakaryocytes. </strong></li>\n<li><strong>Sea blue histiocytes (blue-coloured cytoplasm)</strong></li>\n<li><strong>Pseudo Gaucher cells</strong></li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"MSoledad Noya, Marcio Andrade-Campos, Pilar Irun, Laura López de Frutos, MFernanda López-Fernandez, Pilar Giraldo\" data-hash=\"\" data-license=\"CC BY NC ND 4.0\" data-source=\"https://onlinelibrary.wiley.com/doi/full/10.1002/ccr3.1460\" data-tags=\"\" height=\"425\" src=\"https://image.prepladder.com/content/lUVaOefkGAKVYS0gsxty1745406603.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>NAP/LAP score</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>The <strong>leukocyte <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> <span class=\"customMeta\" data-dictid=\"65f1c4f3d4169277719505249503e0\">phosphatase</span> (LAP) score</strong> is low in CML and can be used to <span class=\"customMeta\" data-dictid=\"c9001edbf216927771860f3475b44c\">differentiate</span> it from other leukaemias, but it’s not the most sensitive test. <strong>(Option B ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>FISH (IOC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Confirms t(9:22) translocation.</li>\n<li>Analysis to quantify Philadelphia chromosome-positive cells.</li>\n<li>Estimates the tumour load.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Muhammad Asif, Mohammad Jamal ,Abdul Rehman Khan ,Muhammad Imran Naseer ,Abrar Hussain, Hani Choudhry, Dr. Arif Malik ,Shahida Aziz Khan ,Maged Mostafa Mahmoud ,Ashraf Ali, Saima Iram, Kashif Kamran, Asim Iqbal, Zainularifeen Abduljaleel, Peter Natesan Pushparaj, Mahmood Rasool\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Fluorescence-in-situ-hybridization-FISH-for-the-detection-of-922q34q11-BCR-ABL_fig2_301779737\" data-tags=\"\" height=\"367\" src=\"https://image.prepladder.com/content/VpSalZFvwAeXha83j9kP1745406612.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>PCR </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>To quantify BCR-ABL-1.</li>\n<li>It can be a false negative or a false positive.</li>\n<li>False negative: Early part of the disease.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a poor prognostic marker of multiple myeloma?", "options": [{"label": "A", "text": "β-2 microglobulin", "correct": true}, {"label": "B", "text": "Calcium levels", "correct": false}, {"label": "C", "text": "Serum creatinine", "correct": false}, {"label": "D", "text": "Protein levels", "correct": false}], "correct_answer": "A. β-2 microglobulin", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<h3><strong>Diagnostic Criteria for Multiple Myeloma</strong><strong> </strong></h3>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Presence of Clonal <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells in <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> or presence of <span class=\"customMeta\" data-dictid=\"a3792999e71692777185880d431114\">CRAB</span> criteria (hypercalcemia, <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> dysfunction, anaemia and bone lesions)</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1. Evidence of one or more indicators of <strong>end-organ damage</strong> attributed to the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell disorder, specifically: <strong>(CRAB)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hypercalcemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Serum <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> >0.25 mmol/L above the upper limit of normal or >2.75 mmol/L<strong> (>11 mg/dL)</strong>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Renal Insufficiency</strong>:</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Creatinine <span class=\"customMeta\" data-dictid=\"3a3fb1b8a816927771840e6a344cc0\">clearance</span> <40 mL/min or <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> <span class=\"customMeta\" data-dictid=\"2ead0fd0301692777185187bd72768\">creatinine</span> >177 μmol/L <strong>(>2 mg/dL)</strong>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hemoglobin >20 g/L below the lower limit of normal or haemoglobin <strong><100 g/L or <10g/100ml</strong>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone Lesions</strong>:</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>One or more <strong>osteolytic lesions were </strong>identified on skeletal radiography, CT, or PET-CT.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>2. Biomarkers of Malignancy</strong> <strong>(any one of the following)</strong>:</p>\n<ul>\n<li>Clonal <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells ≥60%.</li>\n<li>Involved: uninvolved serum-free <span class=\"customMeta\" data-dictid=\"578fe8d7dd16927771913c847ed254\">light chain</span> ratio ≥100.</li>\n<li>1 <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> on <span class=\"customMeta\" data-dictid=\"7ce7bcb2f316927771938e0bea7f4d\">MRI</span> studies.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Poor <span class=\"customMeta\" data-dictid=\"e580b4033e169277719609af594c16\">Prognosis</span> markers:</strong> ↑ β2 microglobulin.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 54-year-old patient presents to the outpatient department with fatigue, tiredness, and cervical lymphadenopathy. The TLC and DLC were normal, with no immature cells. A lymph node biopsy showed diffuse effacement of the lymph node architecture and cells with an indented nucleus and prominent nucleolus that are atypical. CD10 and BCL2 are positive. What is the likely diagnosis?", "options": [{"label": "A", "text": "Follicular lymphoma", "correct": true}, {"label": "B", "text": "Burkitt lymphoma", "correct": false}, {"label": "C", "text": "Mycosis fungoides", "correct": false}, {"label": "D", "text": "Chronic myeloid leukaemia", "correct": false}], "correct_answer": "A. Follicular lymphoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/s6arMLYHSSX6MPb6nUeu1746443249.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Surface IHC markers </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Follicular Lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>CD5 -ve, CD10+ve, CD19+ve, CD20+ve, <strong>BCL2+ve</strong>, BCL6+ve, Surface Ig+ve</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Follicular Hyperplasia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>CD3+ve, CD10+ve, CD20+ve, <strong>BCL2 -ve</strong>, BCL6+ve</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mantle Cell Lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cyclin D1+ve</strong>, CD19+ve, CD20+ve, Surface Ig (usually IgM and IgD) +ve, CD5+ve, <strong>CD23 -ve</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Burkitt’s Lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>IgM+ve, <strong>CD19+ve</strong>, CD20+ve, CD10+ve, BCL6+ve, <strong>BCL2 -ve</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient with cervical lymphadenopathy has a positive t(11;14) translocation. Which of the following markers should be used to confirm the diagnosis? A. CD10 B. CD200 C. SOX11 D. Cyclin D1", "options": [{"label": "A", "text": "A, B", "correct": false}, {"label": "B", "text": "B, D", "correct": false}, {"label": "C", "text": "A, C", "correct": false}, {"label": "D", "text": "C, D", "correct": true}], "correct_answer": "D. C, D", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Neoplasm </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Cell of origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diffuse large B-cell lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Germinal/post-germinal center B cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common NHL.</li>\n<li>Associated with BCL6 gene rearrangement</li>\n<li>If <span class=\"customMeta\" data-dictid=\"f8109755621692777184ae2847c580\">CLL</span> transforms into DLBCL, it is called <strong>Richter's Syndrome.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hairy cell <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">leukemia</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Memory B cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>More common in boys.</li>\n<li><strong>BRAF V600E <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">Mutation</span> +</strong></li>\n<li>It presents with massive <span class=\"customMeta\" data-dictid=\"b3eb52fe3b1692777199de8465eea8\">splenomegaly</span> affecting the red <span class=\"customMeta\" data-dictid=\"5b7b8d266716927771968316ee113b\">pulp</span> of the spleen.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mantle cell lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Naive B cell</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Translocation t(11:14).</li>\n<li>Associated with GIT polyps.</li>\n<li><strong>Cyclin D1 and SOX11 +ve</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mycosis Fungoides </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Helper T cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Cutaneous T-cell NHL</strong><strong>.</strong></li>\n<li>Presents with <span class=\"customMeta\" data-dictid=\"f0f3e105661692777187df507b1f26\">erythema</span> and pruritus.</li>\n<li>If it affects the blood vessels, it is known as <strong>Sezary syndrome.</strong><strong> </strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which gene mutation is most commonly associated with Burkitt's lymphoma?", "options": [{"label": "A", "text": "C-myc", "correct": true}, {"label": "B", "text": "P-21", "correct": false}, {"label": "C", "text": "Rb", "correct": false}, {"label": "D", "text": "p53", "correct": false}], "correct_answer": "A. C-myc", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not true about nodular lymphocyte-predominant Hodgkin lymphoma (NLPHL)?", "options": [{"label": "A", "text": "EBV negative", "correct": false}, {"label": "B", "text": "CD 30 negative", "correct": false}, {"label": "C", "text": "CD 20 positive", "correct": false}, {"label": "D", "text": "Poor prognosis compared to classical HL", "correct": true}], "correct_answer": "D. Poor prognosis compared to classical HL", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/RsjlWKRquko7xoKAbezs1745495524.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:787px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Subtype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Morphology and Immunophenotype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Typical Clinical Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Nodular Sclerosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li>Frequent lacunar cells and occasional <span class=\"customMeta\" data-dictid=\"552e9ef8811692777186997018b858\">diagnostic</span> Reed-Sternberg (RS) cells.</li>\n<li>Background <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> includes T lymphocytes, eosinophils, macrophages, and <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells.</li>\n<li>Fibrous bands divide <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> areas into nodules.</li>\n<li><strong>RS cells:</strong> <strong>CD15+, CD30+; usually EBV negative.</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li>Most common subtype, typically <strong>stage I or II</strong> with <strong>mediastinal involvement</strong>.</li>\n<li>Equal occurrence in <strong>males and females</strong>.</li>\n<li>Common in <strong>young adults</strong>.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Mixed Cellularity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li>Frequent <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">mononuclear</span> and <span class=\"customMeta\" data-dictid=\"552e9ef8811692777186997018b858\">diagnostic</span> RS cells.</li>\n<li>Background <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> rich in T lymphocytes, eosinophils, macrophages, and <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells.</li>\n<li><strong>RS cells: CD15+, CD30+; 70% EBV positive</strong>.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li><strong>More than 50% present as stage III or IV</strong>.</li>\n<li>More common in <strong>males</strong>.</li>\n<li><strong>Biphasic incidence</strong> peaks in <strong>young adults</strong> and those <strong>>55 years</strong>.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Lymphocyte-Rich</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li>Frequent <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">mononuclear</span> and <span class=\"customMeta\" data-dictid=\"552e9ef8811692777186997018b858\">diagnostic</span> RS cells. Background <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> rich in T lymphocytes.</li>\n<li><strong>RS cells:</strong> CD15+, CD30+; 40% EBV positive.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li><strong>Uncommon</strong>, more frequent in <strong>males</strong>.</li>\n<li>Typically seen in <strong>older adults</strong>.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Lymphocyte Depletion</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li>Reticular <span class=\"customMeta\" data-dictid=\"0efdcdc9e01692777201003c81c85a\">variant</span> with numerous RS cells and few background <span class=\"customMeta\" data-dictid=\"092583d1b41692777197a506409267\">reactive</span> cells.</li>\n<li>RS cells: <strong>CD15+, CD30+</strong>, <strong>most EBV positive</strong>.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li><strong>Rare</strong>, more common in <strong>older men</strong>, <strong>HIV-infected individuals</strong>, and <strong>low-income regions</strong>.</li>\n<li>Often presents with <strong>advanced disease</strong>.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Nodular Lymphocyte-Predominant</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li>Frequent L&H (popcorn) cell variants in a background of <span class=\"customMeta\" data-dictid=\"031a38f17a16927772036476ede2ae\">follicular</span> <span class=\"customMeta\" data-dictid=\"77f797c5e8169277718535480fa7fd\">dendritic</span> cells and <span class=\"customMeta\" data-dictid=\"092583d1b41692777197a506409267\">reactive</span> B cells.</li>\n<li>RS cells: <strong>CD20+, CD15−, CD30−; EBV negative</strong>.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<ul>\n<li><strong>Uncommon</strong>, typically in <strong>young males</strong>.</li>\n<li>Presents with <strong>cervical/axillary lymphadenopathy</strong>.</li>\n<li><strong>Rarely involves the mediastinum</strong>.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the correct statement regarding immune surveillance.", "options": [{"label": "A", "text": "Anti-CTLA-4 Ab is a new modality in the treatment of advanced cancers", "correct": true}, {"label": "B", "text": "Mutation of tumour suppressor genes decreases antigen toxicity", "correct": false}, {"label": "C", "text": "PD1/PDL1 activation leading to tumour suppression", "correct": false}, {"label": "D", "text": "Binding of CD28 leads to immune tolerance", "correct": false}], "correct_answer": "A. Anti-CTLA-4 Ab is a new modality in the treatment of advanced cancers", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/UGi0JrggqWAGB8tNSCml1746554908.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All-trans retinoic acid (ATRA) is used in the treatment of tumours associated with which of the following genetic aberrations?", "options": [{"label": "A", "text": "PML-RARA", "correct": true}, {"label": "B", "text": "BCR-ABL", "correct": false}, {"label": "C", "text": "cMYC", "correct": false}, {"label": "D", "text": "RUNX1-ETO", "correct": false}], "correct_answer": "A. PML-RARA", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/q878Tr4dJu3wxYNi6UCU1746440043.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70-year-old man has presented with chronic lower back pain, fatigue, and headaches for the last few weeks. On examination, he has pallor and bony tenderness. Lab investigations revealed an increased ESR, and his skull radiograph revealed several punched-out lytic lesions. Which of the following is the best investigation for this patient among the following options?", "options": [{"label": "A", "text": "Serum electrophoresis showing IgG", "correct": true}, {"label": "B", "text": "Serum levels of CA 15-3", "correct": false}, {"label": "C", "text": "Whole-body scan", "correct": false}, {"label": "D", "text": "CT head with contrast", "correct": false}], "correct_answer": "A. Serum electrophoresis showing IgG", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male underwent a bone marrow examination, which revealed the presence of the following findings, as shown in the image. What is the likely diagnosis of this patient?", "options": [{"label": "A", "text": "Multiple myeloma", "correct": true}, {"label": "B", "text": "ALL", "correct": false}, {"label": "C", "text": "Tuberculosis", "correct": false}, {"label": "D", "text": "Sickle cell disease", "correct": false}], "correct_answer": "A. Multiple myeloma", "question_images": ["https://image.prepladder.com/content/QZnWPJ0JSoqLARsTa5T71746698090.png"], "explanation_images": ["https://image.prepladder.com/content/4PgtbfbpMxIFGQV1iO091746698229.png", "https://image.prepladder.com/content/hVg4eoVjRK7R0yaMXz4A1746698238.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Diagnostic Criteria for Multiple myeloma:</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>≥10% clonal <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells (or)<strong> </strong>a biopsy-proven bony or <span class=\"customMeta\" data-dictid=\"0ba1f7edfa1692777187ae6f51e603\">extramedullary</span> plasmacytoma</li>\n</ul>\n<p><strong> + (PLUS)</strong></p>\n<ul>\n<li>Evidence of one or more <span class=\"customMeta\" data-dictid=\"652999e42416927771936e1f3246e3\">multiple myeloma</span> defining events (MDE): (CRAB features)\n\t\t\t\t<ul>\n<li>Hyper<strong>C</strong>alcemia <strong>(S.Ca2+ >11g/dl)</strong><strong> </strong></li>\n<li><strong>R</strong>enal failure <strong>(S. Creatinine >2mg/dl) </strong></li>\n<li><strong>A</strong>naemia <strong>(Hb <10gm)</strong><strong> </strong></li>\n<li>Lytic <strong>B</strong>one lesions are attributable to the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell disorder.</li>\n</ul>\n</li>\n</ul>\n<p><strong> (OR)</strong></p>\n<p>One or more biomarkers of <span class=\"customMeta\" data-dictid=\"0c7efd2b8716927771914c8cb19e54\">malignancy</span> (<strong>SLIM </strong>criteria)</p>\n<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> clonal plasmacytosis<strong> </strong><strong>≥60%</strong> (<strong>S</strong>ixty per cent)</li>\n<li>Serum involved/uninvolved free <strong>Li</strong>ght chain (FLC) ratio<strong> </strong><strong>≥ 100</strong> (provided involved FLC is ≥100 mg/L)</li>\n<li><strong>>1</strong> <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> on<strong> M</strong>RI.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old boy with Down syndrome presents with mediastinal mass (presenting as SVC-like syndrome), and Peripheral blood and bone marrow have increased lymphoblasts. What is the probable diagnosis?", "options": [{"label": "A", "text": "Acute myeloblastic leukemia", "correct": false}, {"label": "B", "text": "Chronic lymphoblastic leukemia", "correct": false}, {"label": "C", "text": "Acute lymphoblastic leukemia", "correct": true}, {"label": "D", "text": "Chronic myeloid leukemia", "correct": false}], "correct_answer": "C. Acute lymphoblastic leukemia", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Symptoms </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Due to a decline in normal <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> function.</li>\n<li>Fatigue (Anaemia).</li>\n<li>Infections (Neutropenia)</li>\n<li>Bleeding (Thrombocytopenia)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mass effects </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Bone pain due to <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> expansion and <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> of the subperiosteum.</li>\n<li>Generalised lymphadenopathy.</li>\n<li>Hepatosplenomegaly.</li>\n<li>Testicular enlargement.</li>\n<li>Mediastinal mass in T-ALL (Superior <span class=\"customMeta\" data-dictid=\"1014e4cf5e169277719246e0ca91df\">mediastinal</span> syndrome).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CNS manifestations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Headache.</li>\n<li>Vomiting.</li>\n<li>Nerve palsies.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the diagnosis for a 5-year-old boy who has weight loss, fever, and a painless swelling in his jaw area? CBC results indicate anaemia and lymphocytosis. The image below shows biopsy findings from the swelling.", "options": [{"label": "A", "text": "Kikuchi disease", "correct": false}, {"label": "B", "text": "Infectious mononucleosis", "correct": false}, {"label": "C", "text": "Hodgkins lymphoma", "correct": false}, {"label": "D", "text": "Burkitt lymphoma", "correct": true}], "correct_answer": "D. Burkitt lymphoma", "question_images": ["https://image.prepladder.com/content/catbX5mH7Xi8gDl5YlaC1747115752.png"], "explanation_images": ["https://image.prepladder.com/content/Uerx41sJBrRYOxbUIsfK1747115805.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:614px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Burkitt's lymphoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Aspects</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>An aggressive <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of <strong>non-Hodgkin lymphoma</strong> characterised by the <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> B-cells.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Epidemiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Endemic (African) form</strong>: Common in children, associated with <strong>Epstein-Barr virus (EBV)</strong> infection.</li>\n<li><strong>Sporadic form</strong>: Worldwide distribution, more common in children and young adults.</li>\n<li><strong>Immunodeficiency-related</strong>: Often seen in HIV/AIDS patients.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Etiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Strong association with <strong>EBV</strong> (especially in the <span class=\"customMeta\" data-dictid=\"59c8c1e4b316927771873c98afae15\">endemic</span> form).</li>\n<li><strong>Translocations involving the MYC gene</strong> (chromosome 8).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Genetic Abnormality</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>t(8;14):</strong> MYC gene translocated next to the <strong>IgH locus</strong> (most common).</li>\n<li><strong>t(2;8) or t(8;22)</strong>: Less common, involving MYC and Ig <span class=\"customMeta\" data-dictid=\"578fe8d7dd16927771913c847ed254\">light chain</span> loci.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Endemic form</strong>: Presents with jaw or <span class=\"customMeta\" data-dictid=\"9fdd7489051692777202cffe3f24cc\">facial</span> bone tumours.</li>\n<li><strong>Sporadic form</strong>: Often involves the <span class=\"customMeta\" data-dictid=\"ac388c59831692777180f5a8e12913\">abdomen</span> (e.g., ileum, cecum) and may cause <span class=\"customMeta\" data-dictid=\"37863e7aec169277718310f33c6a11\">bowel</span> obstruction.</li>\n<li><strong>Systemic symptoms</strong>: Fever, night sweats, weight loss.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Histology</strong>: \"Starry-sky\" appearance due to numerous apoptotic cells and macrophages.</li>\n<li>Tumor cells are medium-sized with round nuclei, <span class=\"customMeta\" data-dictid=\"28606fa66a169277718407469e7e7c\">coarse</span> chromatin, and high mitotic activity.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Immunophenotype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Positive for <strong>CD19</strong>, <strong>CD20</strong> (B-cell markers), and <strong>CD10</strong>.</li>\n<li>Expresses surface <strong>IgM</strong>.</li>\n<li>High <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> index (Ki-67 > 95%).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Biopsy</strong>: Histological examination showing \"starry-sky\" appearance.</li>\n<li><strong>Cytogenetics</strong>: Detection of MYC translocations.</li>\n<li><strong>Immunohistochemistry</strong>: Positive for B-cell markers (CD19, CD20).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Highly aggressive but potentially curable with prompt treatment.</li>\n<li>Favorable response to <span class=\"customMeta\" data-dictid=\"8602c4b260169277718439bb122cb0\">chemotherapy</span> in many cases.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Chemotherapy</strong>: Intensive regimens like <strong>cyclophosphamide, doxorubicin, vincristine, and <span class=\"customMeta\" data-dictid=\"a98f8182f116927771927e607ba8c8\">methotrexate</span> (CODOX-M)</strong>.</li>\n<li><strong>CNS prophylaxis</strong>: <span class=\"customMeta\" data-dictid=\"a98f8182f116927771927e607ba8c8\">Methotrexate</span> or cytarabine.</li>\n<li>Supportive care for tumour <span class=\"customMeta\" data-dictid=\"803b5ed1c8169277719190b446ac83\">lysis</span> syndrome.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Complications</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Risk of <strong>tumour <span class=\"customMeta\" data-dictid=\"803b5ed1c8169277719190b446ac83\">lysis</span> syndrome</strong> due to rapid tumour breakdown.</li>\n<li>It may progress to involve <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> or CNS if untreated.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Differential Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Diffuse large B-cell lymphoma.</li>\n<li>Other <span class=\"customMeta\" data-dictid=\"ffb779b5ad1692777189091a0aef76\">high-grade</span> B-cell lymphomas.</li>\n<li>Lymphoblastic lymphoma.</li>\n<li>Hodgkin <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> (rarely resembles).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old male patient presented with anaemia and hepatosplenomegaly. A peripheral smear showed teardrop cells, nucleated RBCs, and giant abnormal platelets. A biopsy showed marrow fibrosis and a few characteristics, as given below. The most likely diagnosis is:", "options": [{"label": "A", "text": "Polycythemia vera", "correct": false}, {"label": "B", "text": "Essential thrombocythemia", "correct": false}, {"label": "C", "text": "Primary myelofibrosis", "correct": true}, {"label": "D", "text": "Chronic myeloid leukemia", "correct": false}], "correct_answer": "C. Primary myelofibrosis", "question_images": ["https://image.prepladder.com/content/RFMZEQn2Z325qkFBM2hn1748155212.png"], "explanation_images": ["https://image.prepladder.com/content/uewpJnVjm46XNOho3SkD1748155217.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old man presents with nosebleeds, bleeding gums, and multiple ecchymoses. Lab investigations show: Haemoglobin: 8.5 g/dL Platelet count: 12,000 platelets/mm3 Total leucocyte count: 52,000 cells/mm3 with 83% blasts, as seen below. The blasts are CD33 +ve. The most likely diagnosis is:", "options": [{"label": "A", "text": "Acute myeloid leukemia", "correct": true}, {"label": "B", "text": "Acute lymphoblastic leukemia", "correct": false}, {"label": "C", "text": "Chronic lymphocytic leukemia", "correct": false}, {"label": "D", "text": "Myelodysplastic syndrome", "correct": false}], "correct_answer": "A. Acute myeloid leukemia", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:691px\">\n<tbody>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p> </p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>ALL</strong><br/>\n\t\t\t </p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>AML</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>CML</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>B cell -ALL</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>T cell -ALL</strong><br/>\n\t\t\t </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Most common</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Less common (15%)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>M2 (M/C)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Age</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Children</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Teenagers</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Adults (15-40 years)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Middle-Elderly</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mutation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Loss of function PAX5, E2A, EBF</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Gain of function NOTCH1</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>t(15:17) in M3,<br/>\n\t\t\tt (8:21) in M2</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>t(9:22) BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Good</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Poor</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Good</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Good</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Organ<br/>\n\t\t\tInvolvement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>No tissue involvement</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>CNS, Mediastinum, Testes, Bone pain</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hepatosplenomegaly, <span class=\"customMeta\" data-dictid=\"09980563461692777188b0de904031\">gum</span> hyperplasia, chloroma</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Massive splenomegaly, hepatomegaly</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>PAS+</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Acid Phosphatase</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>MPO+, NSE +</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Decreased NAP/LAP score</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>CD 19,20,21</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>CD 1,2,<strong>3</strong>,<strong>5</strong>,7,<strong>10 (CALLA antigen)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>CD 13, 33, and 117</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>CD 25</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the type of cell from which the cell displayed below originates?", "options": [{"label": "A", "text": "NK cells", "correct": false}, {"label": "B", "text": "CD4 cells", "correct": false}, {"label": "C", "text": "B cells", "correct": true}, {"label": "D", "text": "CD8 cells", "correct": false}], "correct_answer": "C. B cells", "question_images": ["https://image.prepladder.com/content/hPPWXCuLCWpF9LhFhnjy1747123041.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most accurate test for evaluating the effectiveness of treatment in chronic myeloid leukemia (CML)?", "options": [{"label": "A", "text": "СВС", "correct": false}, {"label": "B", "text": "RT PCR", "correct": true}, {"label": "C", "text": "Cytogenetic test", "correct": false}, {"label": "D", "text": "FISH", "correct": false}], "correct_answer": "B. RT PCR", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A young child presents with bleeding gums and bruising for the past two weeks. Bone marrow biopsy and flow cytometry have been performed. What is the diagnosis?", "options": [{"label": "A", "text": "Acute myeloid leukemia", "correct": false}, {"label": "B", "text": "CLL", "correct": false}, {"label": "C", "text": "ALL: B Phenotype", "correct": true}, {"label": "D", "text": "ALL: T Phenotype", "correct": false}], "correct_answer": "C. ALL: B Phenotype", "question_images": ["https://image.prepladder.com/content/nNt1gst5C9F273RlFXr31741890349.png", "https://image.prepladder.com/content/Qcgaf7EzIpPD6EJaep7d1741889310.png"], "explanation_images": ["https://image.prepladder.com/content/ISyXMxZS4d3dnMQ32Bai1741890371.png", "https://image.prepladder.com/content/qt9KAWZ1wHcOs1R4iB2g1741889343.png", "https://image.prepladder.com/content/Nk3aq7KBdgX7P9nBP3gR1741890403.png", "https://image.prepladder.com/content/i5zle6cUbx476v8r7Qh01741890430.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:722px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Lymphoblastic <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">Leukemia</span> (ALL)</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ALL is an acute-onset blood and <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> <span class=\"customMeta\" data-dictid=\"0c7efd2b8716927771914c8cb19e54\">malignancy</span> of B and T lymphoblasts characterised by the uncontrolled <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> and <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> lymphocytes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Age</strong>: 2-8 years (Fast disease progression), adults: > 50 years.</li>\n<li><strong>Weight loss, Night sweats</strong></li>\n<li><strong>Anemia</strong>: Easy <span class=\"customMeta\" data-dictid=\"fe68598d57169277720266a90c128b\">fatigability</span> and pallor</li>\n<li><strong>Bleeding</strong>: Epistaxis, easy bruising.</li>\n<li><strong>Leucocytopenia</strong>: <span class=\"customMeta\" data-dictid=\"c64e3a661b1692777197afc2ff7bca\">Recurrent</span> infections</li>\n<li><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> proliferation</strong>: Bone pain, sternal tenderness</li>\n<li><strong>Hepatosplenomegaly, Lymphadenopathy</strong></li>\n<li><strong>CNS leukemia</strong>: Raised ICP, vomiting, and 6th nerve palsy</li>\n<li><strong>T cell tumors</strong>: <span class=\"customMeta\" data-dictid=\"1014e4cf5e169277719246e0ca91df\">Mediastinal</span> and testicular mass.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CBC</strong> is the first investigation performed while suspecting ALL:</p>\n<ul>\n<li><strong>Hemoglobin (Hb)</strong>: Decreased, indicating <strong>normocytic normochromic anemia.</strong></li>\n<li><strong>Hyperleukocytosis</strong>: <strong>TLC >100,000/µL</strong> can lead to <span class=\"customMeta\" data-dictid=\"7e40ab2f371692777191244834d8f0\">leukostasis</span> (more common in <span class=\"customMeta\" data-dictid=\"9ab5f0308116927771814e1fcc72d6\">AML</span> than ALL) with <strong>>20% Blasts.</strong></li>\n<li><strong>Elderly Presentation</strong>: <span class=\"customMeta\" data-dictid=\"15d4ce5bf21692777200543fdf4d2f\">TLC</span> often remains low throughout ALL.</li>\n<li><strong>Thrombocytopenia </strong>may be present.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Peripheral smear:</strong></p>\n<p>The <span class=\"customMeta\" data-dictid=\"6777533153169277719804fcbbf2d1\">smear</span> shows a <strong>high percentage of lymphoblasts</strong>, which are larger than normal lymphocytes and have a high nucleus-to-cytoplasm ratio. They often have a scant amount of <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and may exhibit nucleoli.</p>\n\t\t\t \n\n\t\t\t<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> aspiration</strong> shows <strong>blasts >20%</strong>.</p>\n<ul>\n<li>It is also used to classify <span class=\"customMeta\" data-dictid=\"55beab619216927771925caac38373\">morphological</span> types into L1, L2, and L3 in the <span class=\"customMeta\" data-dictid=\"1033eff65b1692777202c687baf495\">FAB</span> <span class=\"customMeta\" data-dictid=\"dda6ab11271692777184264b752d39\">classification</span> system.</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>FISH- <span class=\"customMeta\" data-dictid=\"df068e6efc16927772029693b5023e\">Fluorescent</span> <span class=\"customMeta\" data-dictid=\"96aaaa68ce1692777190096abe3c8a\">in situ</span> <span class=\"customMeta\" data-dictid=\"7ac003b8c41692777189e14eda8f2d\">hybridization</span> </strong>shows <span class=\"customMeta\" data-dictid=\"8ba7332e86169277720060bd4507c8\">translocation</span> of genes/chromosomes.</p>\n<ul>\n<li><strong>t(9:22) -</strong> ALL associated with the <strong>Philadelphia chromosome</strong>.</li>\n<li>t(8:14) - Associated with Burkitt's leukemia</li>\n<li>t(4:11)</li>\n<li>t(1:19)</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Flow cytometry:</strong></p>\n<ul>\n<li><strong>CD10, </strong>also known as <strong>common <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> lymphoblastic leukaemia <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> (CALLA),</strong> is a cell surface marker commonly used in the <span class=\"customMeta\" data-dictid=\"dda6ab11271692777184264b752d39\">classification</span> and diagnosis of leukaemias and lymphomas, particularly <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> lymphoblastic leukaemia (ALL).</li>\n<li><strong>B cell type - CD19+, CD79a+. </strong><strong>(Option C)</strong></li>\n<li>T cell type - CD3+ <strong>(Option D ruled out)</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 34-year-old female presents with low hemoglobin, platelet count of 25,000/mm 3 , and raised PT and APTT. The peripheral smear image is shown below. Which of the following fusion genes is likely affected?", "options": [{"label": "A", "text": "PML-RARA", "correct": true}, {"label": "B", "text": "RUNX1-RUNX1T1", "correct": false}, {"label": "C", "text": "INV 16", "correct": false}, {"label": "D", "text": "IGH-NSD2", "correct": false}], "correct_answer": "A. PML-RARA", "question_images": ["https://image.prepladder.com/content/KmunspEZH2rteJFq72GS1724849639.png"], "explanation_images": [], "explanation": "<p>Correct Option A - PML-RARA\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with fever, hepatosplenomegaly, abdominal pain, and WBC count &gt; 50,000/mm 3 . Which of the following genetic abnormalities is involved?", "options": [{"label": "A", "text": "t(9;22)", "correct": true}, {"label": "B", "text": "del(1q)", "correct": false}, {"label": "C", "text": "t(15;17)", "correct": false}, {"label": "D", "text": "del 3q", "correct": false}], "correct_answer": "A. t(9;22)", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - t(9;22)\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td><strong>CML </strong></td>\n<td><strong>Characteristics </strong></td>\n</tr>\n<tr>\n<td>t(9:22)</td>\n<td>Cause </td>\n</tr>\n<tr>\n<td>Massive Spleen </td>\n<td>Spleen </td>\n</tr>\n<tr>\n<td>High </td>\n<td>TLC </td>\n</tr>\n<tr>\n<td>>20% Acc</td>\n<td>Basophils </td>\n</tr>\n<tr>\n<td>Decreased </td>\n<td>LAP score </td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An elderly patient presents with elevated calcium levels, increased serum creatinine levels, and decreased hemoglobin. Electrophoresis reveals a monoclonal spike. Her immunofixation test findings are given below. Which of the following best describes her condition?", "options": [{"label": "A", "text": "MM with increased IgG", "correct": false}, {"label": "B", "text": "MM with increased IgM", "correct": true}, {"label": "C", "text": "MM with increased IgA", "correct": false}, {"label": "D", "text": "Monoclonal gammopathy of unknown significance", "correct": false}], "correct_answer": "B. MM with increased IgM", "question_images": ["https://image.prepladder.com/content/Q58KA5OrdG9v2xAZBggY1724833522.png"], "explanation_images": ["https://image.prepladder.com/content/mHn0GToUJ1X1fFlCqA131724911761.png", "https://image.prepladder.com/content/691sDAKnEwbY0HWALAkM1726817925.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the investigation of choice for CML?", "options": [{"label": "A", "text": "LAP score", "correct": false}, {"label": "B", "text": "FISH", "correct": true}, {"label": "C", "text": "Karyotyping", "correct": false}, {"label": "D", "text": "Reciprocal translocation", "correct": false}], "correct_answer": "B. FISH", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/enS2B7g9sWeV4KvRhxjc1747306330.png", "https://image.prepladder.com/content/D35UJ0rr967c5fjXvU9a1747306330.png", "https://image.prepladder.com/content/1ykXcDmRsDBwbHNX9hzD1747306330.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:664px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Diagnosis of Chronic Myeloid Leukemia (CML)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>CBC</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Normal RBC + <strong>Elevated TLC + Elevated platelets </strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Peripheral smear</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Left shift with predominant segmented neutrophils, myelocytes, and metamyelocytes.</li>\n<li><strong>College girl/garden party appearance:</strong> Due to non-uniform appearance (every cell appears different).</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Chronic_myelogenous_leukemia#/media/File:Chronic_Myeloid_Leukemia_smear_2009-04-09.JPG\" data-tags=\"\" height=\"332\" src=\"https://image.prepladder.com/content/enS2B7g9sWeV4KvRhxjc1747306330.png\" width=\"390\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> aspirate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Increased</strong> Myeloid: Erythroid ratio.</li>\n<li><strong>Dwarf megakaryocytes.</strong></li>\n<li><strong>Sea blue histiocytes</strong> (blue-coloured cytoplasm)</li>\n<li><strong>Pseudo Gaucher cells</strong></li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Gören Şahin D, Üsküdar Teke H, Karagülle M, Andıç N, Gündüz E, Işıksoy S, Balić M, Akay OM \" data-hash=\"\" data-license=\"CC BY 2.5\" data-source=\"https://openi.nlm.nih.gov/detailedresult?img=PMC4454064_TJH-31-428-g1&query=pseudo%20gaucher%20cells&it=xg&req=4&npos=1\" data-tags=\"\" height=\"311\" src=\"https://image.prepladder.com/content/D35UJ0rr967c5fjXvU9a1747306330.png\" width=\"378\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p>The image shows Pseudo-Gaucher cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>NAP (Neutrophil Alkaline Phosphatase)/LAP score (Leukocyte Alkaline Phosphatase)</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Decreased</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>FISH</strong> <strong>(IOC) </strong></p>\n<p><strong>(Option B) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Confirms t(9:22) translocation.</li>\n<li>Analysis to quantify Philadelphia chromosome-positive cells.</li>\n<li>Estimates the tumour load.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Asif M, Jamal MS, Khan AR, Naseer MI, Hussain A, Choudhry H, Malik A, Khan SA, Mahmoud MM, Ali A, Iram S, Kamran K, Iqbal A, Abduljaleel Z, Pushparaj PN, Rasool M\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://openi.nlm.nih.gov/detailedresult?img=PMC4885335_fonc-06-00124-g002&query=bcr%20abl%20fusion%20gene&it=xg&lic=by&req=4&npos=74\" data-tags=\"\" height=\"365\" src=\"https://image.prepladder.com/content/1ykXcDmRsDBwbHNX9hzD1747306330.png\" width=\"497\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p>The image shows BCR-ABL gene <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> (red + green) in <span class=\"customMeta\" data-dictid=\"da0e2a00fa1692777202d6e2054b26\">fluorescence</span> in-situ hybridisation (FISH; the ABL gene is red, and the BCR gene is green).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>PCR </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>To quantify BCR-ABL-1</li>\n<li>It can be a false negative or false positive</li>\n<li>False negative: Early part of the disease</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Mark the incorrect statement regarding Hodgkin Lymphoma:", "options": [{"label": "A", "text": "Reed Sternberg cells are of B-cell origin", "correct": false}, {"label": "B", "text": "Waldeyer's ring is involved", "correct": true}, {"label": "C", "text": "Nodular sclerosing is the most commonsubtype and involves mediastinum", "correct": false}, {"label": "D", "text": "CD 15, 30 Positivity in Reed Sternberg cells", "correct": false}], "correct_answer": "B. Waldeyer's ring is involved", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Waldeyer's ring is involv\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient with elevated calcium and normal alkaline phosphatase undergoes a skull X-ray. What is the likely diagnosis?", "options": [{"label": "A", "text": "Grave’s disease", "correct": false}, {"label": "B", "text": "Paget’s disease", "correct": false}, {"label": "C", "text": "Multiple myeloma", "correct": true}, {"label": "D", "text": "CML", "correct": false}], "correct_answer": "C. Multiple myeloma", "question_images": ["https://image.prepladder.com/content/Am65HH5VavrM34ejYNCC1747217816.png"], "explanation_images": ["https://image.prepladder.com/content/45gvr83TrPCjHDv0KMOg1747217858.png", "https://image.prepladder.com/content/7WVvYMBH0vnjWFJos3bc1747217858.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Monoclonal Immunoglobulins</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Free Light Chains</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>IgG: Most common (55% of patients).</li>\n<li>IgA: Seen in 25% of cases.</li>\n<li>IgM, IgD, IgE: Less common.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Often produced in excess, these are called <strong>Bence Jones proteins</strong>.</li>\n<li>It can cause <span class=\"customMeta\" data-dictid=\"aa6a0dfcb61692777193561ed10fac\">myeloma</span> <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">kidney</span> (renal disease).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Diagnostic Criteria for Multiple myeloma:</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>≥10% clonal <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells (or)<strong> </strong>a biopsy-proven bony or <span class=\"customMeta\" data-dictid=\"0ba1f7edfa1692777187ae6f51e603\">extramedullary</span> plasmacytoma</li>\n</ul>\n<p><strong> + (PLUS)</strong></p>\n<ul>\n<li>Evidence of one or more <span class=\"customMeta\" data-dictid=\"652999e42416927771936e1f3246e3\">multiple myeloma</span> defining events (MDE): (CRAB features)\n\t\t\t\t<ul>\n<li>Hyper<strong>C</strong>alcemia <strong>(S.Ca2+ >11g/dl)</strong><strong> </strong></li>\n<li><strong>R</strong>enal failure <strong>(S. Creatinine >2mg/dl) </strong></li>\n<li><strong>A</strong>naemia <strong>(Hb <10gm)</strong><strong> </strong></li>\n<li>Lytic <strong>B</strong>one lesions are attributable to the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell disorder.</li>\n</ul>\n</li>\n</ul>\n<p><strong> (OR)</strong></p>\n<ul>\n<li>One or more biomarkers of <span class=\"customMeta\" data-dictid=\"0c7efd2b8716927771914c8cb19e54\">malignancy</span> (SLIM criteria)\n\t\t\t\t<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> clonal plasmacytosis<strong> </strong><strong>≥60%</strong> (<strong>S</strong>ixty per cent)</li>\n<li>Serum involved/uninvolved free <strong>Li</strong>ght chain (FLC) ratio<strong> </strong><strong>≥ 100</strong> (provided involved FLC is ≥100 mg/L)</li>\n<li><strong>>1</strong> <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> on<strong> M</strong>RI.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old male complains of lower back pain with a 1-1.5 mm osteolytic lesion at the T10 vertebra. Histopathological findings are given below. Which of the following options is correct regarding this condition?", "options": [{"label": "A", "text": "Presence of Bence-Jones proteinuria", "correct": true}, {"label": "B", "text": "Absence of Rouleaux formation", "correct": false}, {"label": "C", "text": "Absence of free light chains", "correct": false}, {"label": "D", "text": "Decreased Calcium levels in the blood", "correct": false}], "correct_answer": "A. Presence of Bence-Jones proteinuria", "question_images": ["https://image.prepladder.com/content/DtEoOJUcK4tabc0KHZB21747377222.png"], "explanation_images": ["https://image.prepladder.com/content/T9thNfvErBaxN96m4bEh1747223937.png", "https://image.prepladder.com/content/a5lpJOOhtacft2JnVFdK1747223937.png", "https://image.prepladder.com/content/y5Y69NVAumJmoaEvkg6k1747223936.png", "https://image.prepladder.com/content/oWKsGWOaJJXwlddmGULI1747223937.png", "https://image.prepladder.com/content/j8Uh9PIIX1vj2cE9Qjpb1747223937.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Inclusion Bodies Seen In Multiple Myeloma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Russel bodies:</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Peter Maslak\" data-hash=\"\" data-license=\"American Society of hematology\" data-source=\"https://imagebank.hematology.org/imageset/890/russell-bodies\" data-tags=\"\" height=\"252\" src=\"https://image.prepladder.com/content/T9thNfvErBaxN96m4bEh1747223937.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Location:</strong> Intracytoplasmic</li>\n<li><strong>Composition:</strong>\n<ul style=\"list-style-type:circle\">\n<li>Eosinophilic</li>\n<li>Round</li>\n<li>Dilated <span class=\"customMeta\" data-dictid=\"c01a5a8c221692777187daa368ab62\">endoplasmic reticulum</span> <span class=\"customMeta\" data-dictid=\"11900fa000169277718475f5b54b45\">cisternae</span> filled with condensed immunoglobulin.</li>\n</ul>\n</li>\n</ul>\n<p>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Dutcher bodies</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Gabriel Caponetti\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Dutcher_and_Russell_bodies.jpg\" data-tags=\"\" height=\"204\" src=\"https://image.prepladder.com/content/a5lpJOOhtacft2JnVFdK1747223937.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Location:</strong> Intranuclear.</li>\n<li><strong>Composition:</strong> Globular inclusions containing accumulated immunoglobulin.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Plasma Cell Variants In Multiple Myeloma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mott cells </strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mangla, Ankit & Agarwal, Nikki & Kim, George & Catchatourian, Rosalind.\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Mott-cells-Russell-bodies-seen-within-the-cytoplasm-as-vesicles-and-dilated-endoplasmic_fig3_305369257\" data-tags=\"\" height=\"268\" src=\"https://image.prepladder.com/content/y5Y69NVAumJmoaEvkg6k1747223936.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Contain Grape-like cytoplasmic droplets.</li>\n<li><strong>Composition: </strong>Inclusion bodies, fibrils, <span class=\"customMeta\" data-dictid=\"35b1a3c6191692777185a1e2376fc0\">crystalline</span> rods, and globules.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Flame cells</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"University of Alberta\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://pressbooks.openeducationalberta.ca/mlsci/chapter/plasma-cell-myeloma-multiple-myeloma/ Image: https://pressbooks.openeducationalberta.ca/app/uploads/sites/3/2018/08/0472FlameCell100x2-Gloria-Kwon-ARROW.jpg \" data-tags=\"\" height=\"239\" src=\"https://image.prepladder.com/content/oWKsGWOaJJXwlddmGULI1747223937.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Appearance</strong>: Fiery red cytoplasm.</li>\n<li><strong>Cause</strong>: High concentration of <span class=\"customMeta\" data-dictid=\"f8fab286571692777189bdfd087071\">immunoglobulin</span> as bright red granules within the cytoplasm.</li>\n<li>Often seen in <strong>IgA subtype myeloma.</strong></li>\n</ul>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Rouleaux formation</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Gabriel Caponetti\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Rouleaux.jpg\" data-tags=\"\" height=\"230\" src=\"https://image.prepladder.com/content/j8Uh9PIIX1vj2cE9Qjpb1747223937.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>High levels of M protein in the blood cause red cells to stick to one another in <span class=\"customMeta\" data-dictid=\"d02067c4b51692777191b8eec8b062\">linear</span> arrays in smears, a finding <span class=\"customMeta\" data-dictid=\"047f8930dd1692777197fed61e213c\">referred</span> to as rouleaux formation. <strong>(Option B ruled out)</strong></li>\n<li>It is also seen in s <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">lupus</span> erythematosus and early HIV infection.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Diagnostic Criteria for Multiple myeloma:</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>≥10% clonal <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells (or)<strong> </strong>a biopsy-proven bony or extra <span class=\"customMeta\" data-dictid=\"0a36e18386169277719259641cf29b\">medullary</span> plasmacytoma</li>\n</ul>\n<p><strong> + (PLUS)</strong></p>\n<ul>\n<li>Evidence of one or more <span class=\"customMeta\" data-dictid=\"652999e42416927771936e1f3246e3\">multiple myeloma</span> defining events (MDE): (CRAB features)\n\t\t\t\t<ul>\n<li>Hyper<strong>C</strong>alcemia <strong>(S.Ca2+ >11g/dl)</strong><strong> </strong></li>\n<li><strong>R</strong>enal failure <strong>(S. Creatinine >2mg/dl) </strong></li>\n<li><strong>A</strong>naemia <strong>(Hb <10gm)</strong><strong> </strong></li>\n<li>Lytic <strong>B</strong>one lesions are attributable to the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell disorder.</li>\n</ul>\n</li>\n</ul>\n<p><strong> (OR)</strong></p>\n<ul>\n<li>One or more biomarkers of <span class=\"customMeta\" data-dictid=\"0c7efd2b8716927771914c8cb19e54\">malignancy</span> (SLIM criteria)\n\t\t\t\t<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> clonal plasmacytosis<strong> </strong><strong>≥60%</strong> (<strong>S</strong>ixty per cent)</li>\n<li>Serum involved/uninvolved free <strong>Li</strong>ght chain (FLC) ratio<strong> </strong><strong>≥ 100</strong> (provided involved FLC is ≥100 mg/L)</li>\n<li><strong>>1</strong> <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> on<strong> M</strong>RI.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which among the following is associated with Cryoglobulinemia?", "options": [{"label": "A", "text": "Hepatitis C infection", "correct": true}, {"label": "B", "text": "Ovarian cancer", "correct": false}, {"label": "C", "text": "Diabetes", "correct": false}, {"label": "D", "text": "Leukaemia", "correct": false}], "correct_answer": "A. Hepatitis C infection", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following cells is shown in the given image?", "options": [{"label": "A", "text": "Hairy cell", "correct": true}, {"label": "B", "text": "Gaucher cell", "correct": false}, {"label": "C", "text": "Sickle cell", "correct": false}, {"label": "D", "text": "Target cell", "correct": false}], "correct_answer": "A. Hairy cell", "question_images": ["https://image.prepladder.com/content/CejDkgi79ce9n138WVy71746007269.png"], "explanation_images": ["https://image.prepladder.com/content/zpcY8zvAIDQ87X8sFBNv1746007315.png", "https://image.prepladder.com/notes/jzAsb5bBiHjWwBfR78Tu1746180856.png", "https://image.prepladder.com/content/sCgbdRBCmrChnjOLMOJg1746007337.png", "https://image.prepladder.com/content/dq60pIIup5S3W2fOfYjv1746007352.png", "https://image.prepladder.com/content/jjvMrwpIf3Ng9HLhKMH91746007397.png", "https://image.prepladder.com/content/WG8VeoBQsw3oRFHeAbOu1746007405.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:1px solid #0d0d0d\">\n<p style=\"text-align: center;\"><strong>Hairy cell leukemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Pathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Mutation of BRAF V600E gene → Activation of the BRAF protein → MAPK/ERK signalling <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> → Uncontrolled <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and survival of <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> B-cells (Hairy cells).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Peripheral Blood Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Hairy cells with round, oblong, or <span class=\"customMeta\" data-dictid=\"77adee7b1016927771972574741517\">reniform</span> <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and pale blue cytoplasm.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Hairy_cell_leukemia#/media/File:Hairy_cell_leukemia_smear_2009-08-20.JPG\" data-tags=\"\" height=\"287\" src=\"https://image.prepladder.com/content/jjvMrwpIf3Ng9HLhKMH91746007397.png\" width=\"374\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> Biopsy Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Hypocellular or fibrotic <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> with \"hairy cells\".</li>\n<li>Fried egg appearance.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mark ong\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Bone_marrow_infiltration_by_hairy_cell_leukaemia.jpg\" data-tags=\"\" height=\"250\" src=\"https://image.prepladder.com/content/WG8VeoBQsw3oRFHeAbOu1746007405.png\" width=\"330\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<ul>\n<li>Flow cytometry</li>\n<li>Immunophenotyping</li>\n<li>Genetic testing for BRAF V600E mutation</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70 year old male presents with low back ache and progressive pallor. On work up: KFT is deranged, LFT is normal with normal level of albumin and gamma globulin increased disproportionately. X-ray spine shows multiple lytic lesions. Which of the following is the most probable diagnosis?", "options": [{"label": "A", "text": "Multiple myeloma", "correct": true}, {"label": "B", "text": "MGUS", "correct": false}, {"label": "C", "text": "Immunoglobulin light chain amyloidosis (AL)", "correct": false}, {"label": "D", "text": "Solitary plasmacytoma.", "correct": false}], "correct_answer": "A. Multiple myeloma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Mu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male patient presents with fever, night sweats, and pleural effusion. On further investigation, he is diagnosed with Primary Effusion Lymphoma. What is the most likely causative agent responsible for this condition?", "options": [{"label": "A", "text": "HHV-8", "correct": true}, {"label": "B", "text": "EBV", "correct": false}, {"label": "C", "text": "HPV", "correct": false}, {"label": "D", "text": "HIV", "correct": false}], "correct_answer": "A. HHV-8", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What further test should be conducted for a 60-year-old male patient who has presented with widespread lymph node enlargement, elevated white blood cell count, and smudge cells observed on peripheral smear?", "options": [{"label": "A", "text": "Cytogenic study", "correct": false}, {"label": "B", "text": "Bone marrow biopsy", "correct": false}, {"label": "C", "text": "Flow cytometry from peripheral blood", "correct": true}, {"label": "D", "text": "X-ray crystallography", "correct": false}], "correct_answer": "C. Flow cytometry from peripheral blood", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An African child is found to have a mass in the jaw. A biopsy of the mass was done, and it appears as shown in the image below. The child also has a translocation, t(8;14). What is the probable diagnosis?", "options": [{"label": "A", "text": "Acute myeloid leukemia", "correct": false}, {"label": "B", "text": "Follicular lymphoma", "correct": false}, {"label": "C", "text": "Multiple myeloma", "correct": false}, {"label": "D", "text": "Burkitt lymphoma", "correct": true}], "correct_answer": "D. Burkitt lymphoma", "question_images": ["https://image.prepladder.com/content/kjlo246wR5v4K5GjltED1745313821.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An elderly male presents for a routine medical examination. Laboratory investigations reveal a very high total leukocyte count (TLC). The peripheral smear shows findings as shown in the image. What is the appropriate next step for this patient?", "options": [{"label": "A", "text": "Stem cell transplantation", "correct": false}, {"label": "B", "text": "Bone marrow biopsy", "correct": false}, {"label": "C", "text": "Flow cytometry", "correct": true}, {"label": "D", "text": "Start high-dose chemotherapy", "correct": false}], "correct_answer": "C. Flow cytometry", "question_images": ["https://image.prepladder.com/content/72AJRgP35nwPyqs3iHUG1745315722.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Chronic Lymphocytic Leukemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Genetics: </strong>Trisomy 12,<strong> <span class=\"customMeta\" data-dictid=\"cf1e8ec6121692777185eba2630061\">deletion</span> 13q14</strong>, and others</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Origin:</strong> Post–germinal <span class=\"customMeta\" data-dictid=\"1feb2a0a3016927771847db9449f75\">centre</span> memory<strong> </strong><strong>B cell</strong><strong> </strong>or naive B Cells in the <span class=\"customMeta\" data-dictid=\"5ec65d4890169277719136decb922c\">mantle</span> zone of the <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> node.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Etiopathogenesis</strong></p>\n<ul>\n<li>Antiapoptotic protein BCL2 overexpression.</li>\n<li>CLL cell growth depends on Bruton Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> (BTK) activity.</li>\n<li>No association with radiation exposure</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Clinical Presentation</strong></p>\n<ul>\n<li>Most common Leukemia in the elderly.</li>\n<li>Frequently <span class=\"customMeta\" data-dictid=\"d1a9a79f701692777182066af09044\">asymptomatic</span> at diagnosis.</li>\n<li>May present with fatigue, lymphadenopathy, hepatosplenomegaly, or infection due to immunosuppression.</li>\n<li>Associated with <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia- spherocytes can be seen on <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> smear</li>\n<li>Can l/t Hypogammaglobulinemia( highlight )as B cells are <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> -</li>\n<li>Infection is the M/C/C of death in CLL</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #9a9a9a; border-left:1px solid #9a9a9a; border-right:1px solid #9a9a9a; border-top:1px solid #9a9a9a; vertical-align:top\">\n<p><strong>Laboratory diagnosis:</strong></p>\n<ul>\n<li>Absolute <span class=\"customMeta\" data-dictid=\"c605d4126116927771916c2002638e\">lymphocyte</span> count (ALC) > 5000/mm3</li>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> lymphocytes >30%</li>\n<li>Surface markers using flow <span class=\"customMeta\" data-dictid=\"551a62b1ec169277718587f847e627\">cytometry</span> were positive for <strong>CD5, CD23, CD19, and CD20.</strong>\n<ul>\n<li>CLL co-expresses both T cell (CD5) and B cell (CD20, CD19) markers</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old male presented with low haemoglobin, a platelet count of 25,000/mL, gum bleeding, and raised PT and aPTT. The image of his peripheral smear is shown below. What is the likely diagnosis?", "options": [{"label": "A", "text": "AML with t(8;21)", "correct": false}, {"label": "B", "text": "AML with inv(16)", "correct": false}, {"label": "C", "text": "AML with t(15;17)", "correct": true}, {"label": "D", "text": "AML with t(11;22)", "correct": false}], "correct_answer": "C. AML with t(15;17)", "question_images": ["https://image.prepladder.com/content/y0YOrS15SN96UlWNHCYX1745315967.png"], "explanation_images": ["https://image.prepladder.com/content/tS4CqlJvY8efJemdBPIc1745316127.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>FAB <span class=\"customMeta\" data-dictid=\"dda6ab11271692777184264b752d39\">classification</span> of AML</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Subtype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Name</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M0</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AML undifferentiated</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>MPO negative</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AML without maturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>MPO +</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AML with maturation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common</li>\n<li>t(8:21) RUNX1-RUNX1T1 fusion</li>\n<li>Associated with chloroma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute promyelocytic leukemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>t(15:17) - PML-RAR𝛼 fusion</strong></li>\n<li>Blocks <span class=\"customMeta\" data-dictid=\"cb12d6781c16927771962b853d3946\">promyelocyte</span> → <span class=\"customMeta\" data-dictid=\"23b7c84dee1692777193cbdc4c453d\">myelocyte</span> transformation.</li>\n<li>Bone marrow: <strong>Auer rods</strong> <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> criss-cross called faggot cell.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Mikael Häggström, M.D\" data-hash=\"\" data-license=\"CC0\" data-source=\"https://commons.wikimedia.org/wiki/File:Cytology_of_acute_promyelocytic_leukemia,_annotated.png\" data-tags=\"\" height=\"266\" src=\"https://image.prepladder.com/content/tS4CqlJvY8efJemdBPIc1745316127.png\" width=\"390\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<ul>\n<li>Can cause <span class=\"customMeta\" data-dictid=\"f4006059f916927771865569d4da7d\">disseminated</span> <span class=\"customMeta\" data-dictid=\"837d6227d81692777190a063ea2cd4\">intravascular</span> <span class=\"customMeta\" data-dictid=\"42f1e4deb8169277718412c0681a54\">coagulation</span> (DIC)</li>\n<li>PAS+</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M4</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute <span class=\"customMeta\" data-dictid=\"215dafdbad1692777193dcb48ddd63\">myelomonocytic</span> leukemia</strong><br/>\n<strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Associated with <strong>inv 16</strong> and <strong>CBF-MYH <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene</strong></li>\n<li>Gums: <span class=\"customMeta\" data-dictid=\"09980563461692777188b0de904031\">Gum</span> hypertrophy</li>\n<li>Skin: Leukaemia cutis</li>\n<li>MPO+, NSE +</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M5</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute <span class=\"customMeta\" data-dictid=\"7eae8f57ab16927771922b5f3d81e4\">monocytic</span> leukemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gums: <span class=\"customMeta\" data-dictid=\"09980563461692777188b0de904031\">Gum</span> hypertrophy</li>\n<li>Skin: Leukaemia cutis</li>\n<li>MPO-, NSE +</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M6</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute <span class=\"customMeta\" data-dictid=\"892718f3e916927771871389d2e1a3\">erythroid</span> leukemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Also called <strong>Di Guglielmo Disease</strong></li>\n<li>Diffuse PAS+, cd71</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML-M7</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute megakaryocytic leukemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">Marrow</span> <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">aspiration</span> gives a dry tap</li>\n<li>PAS+, cd41 and cd61</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following leukaemias is associated with the given peripheral smear?", "options": [{"label": "A", "text": "Acute lymphoblastic leukemia", "correct": false}, {"label": "B", "text": "Chronic lymphocytic leukemia", "correct": true}, {"label": "C", "text": "Acute myeloid leukemia", "correct": false}, {"label": "D", "text": "Chronic myelogenous leukemia", "correct": false}], "correct_answer": "B. Chronic lymphocytic leukemia", "question_images": ["https://image.prepladder.com/notes/aTHPRCV2tFgA5rVXHKbv1746697463.png"], "explanation_images": ["https://image.prepladder.com/notes/CbnsAoTeyFq5nA8NpvE41745252957.png", "https://image.prepladder.com/notes/ikR8ENlEFO6JFGrbvGHp1745253038.png", "https://image.prepladder.com/notes/mnBYnKQepZpvmjLIX5Kq1745253091.png", "https://image.prepladder.com/notes/p3EPn4lZNiEDfaiDGglJ1745253208.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:900px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Temporary Acute Lymphoblastic Leukemia (ALL)\" data-author=\"VashiDonsk \" data-hash=\"10755\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Leukemia#/media/File:Acute_leukemia-ALL.jpg\" data-tags=\"April2025\" height=\"324\" src=\"https://image.prepladder.com/notes/CbnsAoTeyFq5nA8NpvE41745252957.png\" width=\"413\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Lymphoblastic Leukemia (ALL): </strong><strong>(Option A)</strong></p>\n\t\t\t \n\n\t\t\t<ul>\n<li><strong>Lymphoblasts in <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> >=20%</strong></li>\n<li><strong>Cytoplasmic vacuolations</strong></li>\n<li>They contain fat<strong> (Oil Red O Positive) </strong></li>\n<li><strong>Hand mirror-shaped cells</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Temporary Acute Myeloid Leukemia (AML)\" data-author=\"Makysm\" data-hash=\"10756\" data-license=\"CC0\" data-source=\"https://en.wikipedia.org/wiki/Acute_myeloid_leukemia#/media/File:Acute_Myeloid_Leukemia_(M2_type).jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/ikR8ENlEFO6JFGrbvGHp1745253038.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Myeloid Leukemia (AML) </strong><strong>(Option C)</strong></p>\n<ul>\n<li>Blasts ≥ 20%</li>\n<li><strong>Myeloblasts with Auer rods </strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"Temporary Chronic Lymphocytic Leukemia (CLL)\" data-author=\"Oscier, David & Else, Monica & Matutes, Estela & Morilla, Ricardo & Strefford, Jonathan & Catovsky, Daniel\" data-hash=\"10757\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Morphological-appearances-of-chronic-lymphocytic-leukaemia-CLL-and-CLL-with-10_fig1_302032812\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/mnBYnKQepZpvmjLIX5Kq1745253091.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic Lymphocytic Leukemia (CLL):</strong></p>\n<ul>\n<li><strong>Smudge cells</strong> (or parachute/basket cell): Due to the <span class=\"customMeta\" data-dictid=\"0f4e78e9121692777203594ba840cc\">fragility</span> of lymphocytes during slide preparation</li>\n<li><strong>Convent Girl Appearance:</strong> Lot of homogenous, small, mature-like, round lymphocytes with scant cytoplasm</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"Temporary Chronic Myeloid Leukemia (CML)\" data-author=\"Paulo Henrique Orlandi Mourao\" data-hash=\"10762\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Chronic_myelogenous_leukemia#/media/File:Chronic_Myeloid_Leukemia_smear_2009-04-09.JPG\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/p3EPn4lZNiEDfaiDGglJ1745253208.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic Myeloid Leukemia (CML) </strong><strong>(Option D)</strong></p>\n<ul>\n<li>Leukocytosis</li>\n<li>Cell Types: Neutrophils( multilobed nucleus), metamyelocytes (indented nucleus), myelocytes (D-shaped nucleus), and eosinophils (orange cells)</li>\n<li><strong>College girl/garden party appearance:</strong><strong> </strong>Due to the variety of cell appearances</li>\n<li><strong>Shift to the Left:</strong> Presence of <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> cell types, mainly <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> neutrophils, in the blood.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the cell in the image below:", "options": [{"label": "A", "text": "Mast cell", "correct": true}, {"label": "B", "text": "Macrophage", "correct": false}, {"label": "C", "text": "Plasma cell", "correct": false}, {"label": "D", "text": "Fibroblast", "correct": false}], "correct_answer": "A. Mast cell", "question_images": ["https://image.prepladder.com/notes/v3QA708ln14bvPQIjmXB1746697648.png"], "explanation_images": ["https://image.prepladder.com/notes/6QPMDEUQ48nv3cKqFJTg1746697746.png", "https://image.prepladder.com/notes/j75Lj2zEDXKJUHd6fo691745254122.png", "https://image.prepladder.com/notes/6nN5tU9T9NoG4wqdA3Ki1745254175.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old male presents with fatigue for the past year. Examination reveals massive splenomegaly. His blood workup shows the following findings: Anemia Total leukocyte count (TLC): 150,000/microliter Peripheral smear: 60% neutrophils, 6% basophils, 4% eosinophils, myeloblasts, myelocytes, and metamyelocytes Myeloid to erythroid ratio: 18:1 What is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute Lymphoblastic Leukemia (ALL)", "correct": false}, {"label": "B", "text": "Acute Myeloid Leukemia (AML)", "correct": false}, {"label": "C", "text": "Chronic Myelogenous Leukemia (CML)", "correct": true}, {"label": "D", "text": "Chronic Lymphocytic Leukemia (CLL)", "correct": false}], "correct_answer": "C. Chronic Myelogenous Leukemia (CML)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/u9tP6gEHlrzvUBDguGR31745918653.png", "https://image.prepladder.com/content/nquxzOK57n5HpQRxIT041745918653.png", "https://image.prepladder.com/content/XJDOpLZmoF5hBWYmjA6x1745918653.png", "https://image.prepladder.com/content/av10wRjJ3hT6NevdRwOw1745918653.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:613px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Details</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Genetics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Philadelphia <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> (t(9;22))</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Myeloid lineage</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Etiopathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene causes overactive tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> activity and is associated with radiation exposure.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Common in adults, presenting with splenomegaly, fatigue, weight loss, night sweats, and <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> discomfort.</li>\n<li>It can progress to a <span class=\"customMeta\" data-dictid=\"c961b3ec6516927771831836e7f351\">blast crisis</span> with <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> leukaemia features.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> <span class=\"customMeta\" data-dictid=\"a246c8382816927771821a267ea486\">aspirate</span> to confirm diagnosis</li>\n<li>FISH to detect BCR-ABL <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> gene product</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Management</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Tyrosine <span class=\"customMeta\" data-dictid=\"9863da498e1692777190e1c6515b48\">kinase</span> inhibitors (e.g., Imatinib)</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:647px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>1) Chronic phase:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<ul>\n<li>Leukocytosis, <strong>< 10% blast cells, basophils <20% </strong>and <span class=\"customMeta\" data-dictid=\"cc8beb11041692777192b19dfb290a\">monocytosis</span> < 3%</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>2) Accelerated phase:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>10%-19% blasts, ≥ 20% basophils</strong> in the <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood or bone marrow</li>\n<li>Persistent or increasing WBC (>10 × 10^9/L) and <strong>splenomegaly,</strong> unresponsive to therapy</li>\n<li>Persistent <strong>thrombocytosis</strong> (>1000 × 10^9/L), unresponsive to therapy</li>\n<li>Persistent <strong>thrombocytopenia</strong> (<100 × 10^9/L) unrelated to therapy</li>\n<li>This phase often leads to the<strong> <span class=\"customMeta\" data-dictid=\"16b76d1d1c1692777200240efcb0e2\">terminal</span> <span class=\"customMeta\" data-dictid=\"c961b3ec6516927771831836e7f351\">blast crisis</span> within 6-12 months.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>3) Blast Crisis:</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>≥20% blasts</strong> in <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood or bone marrow</li>\n<li>In 50% of patients, the <span class=\"customMeta\" data-dictid=\"c961b3ec6516927771831836e7f351\">blast crisis</span> occurs abruptly without an accelerated phase.</li>\n<li><strong>Extensive <span class=\"customMeta\" data-dictid=\"0ba1f7edfa1692777187ae6f51e603\">extramedullary</span> hematopoiesis</strong> occurs to compensate for CML and leads to significant splenomegaly.</li>\n<li>Transformation into <strong>AML</strong> is more predominant than ALL.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"VashiDonsk\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Acute_leukemia-ALL.jpg\" data-tags=\"\" height=\"438\" src=\"https://image.prepladder.com/content/u9tP6gEHlrzvUBDguGR31745918653.png\" width=\"585\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Acute Lymphoblastic Leukemia (ALL)</strong></p>\n<p> </p>\n<ul>\n<li><strong>Lymphoblasts in <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> >=20%</strong></li>\n<li><strong>Cytoplasmic vacuolations</strong></li>\n<li>They contain fat (Oil Red O Positive)</li>\n<li><strong>Hand mirror-shaped cells</strong></li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"The Armed Forces Institute of Pathology\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:Faggot_cell_in_AML-M3.jpg\" data-tags=\"\" height=\"492\" src=\"https://image.prepladder.com/content/nquxzOK57n5HpQRxIT041745918653.png\" width=\"585\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Acute <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> Leukemia (AML) </strong></p>\n<ul>\n<li>Blasts ≥ 20%</li>\n<li><strong>Myeloblasts with AuerRods </strong></li>\n</ul>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"The Armed Forces Institute of Pathology\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:B-cell_chronic_lymphocytic_leukemia_(B-CLL).jpg\" data-tags=\"\" height=\"471\" src=\"https://image.prepladder.com/content/XJDOpLZmoF5hBWYmjA6x1745918653.png\" width=\"584\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>3. Chronic Lymphocytic Leukemia (CLL):</strong></p>\n<ul>\n<li><strong>Smudge cells</strong> (or parachute/basket cell): Due to the <span class=\"customMeta\" data-dictid=\"0f4e78e9121692777203594ba840cc\">fragility</span> of lymphocytes during slide preparation</li>\n<li><strong>Convent Girl Appearance:</strong> Lot of homogenous, small, mature-like, round lymphocytes with scant cytoplasm</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Paulo Henrique Orlandi Mourao\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Chronic_myelogenous_leukemia#/media/File:Chronic_Myeloid_Leukemia_smear_2009-04-09.JPG\" data-tags=\"\" height=\"497\" src=\"https://image.prepladder.com/content/av10wRjJ3hT6NevdRwOw1745918653.png\" width=\"584\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> Leukemia (CML)</strong></p>\n<ul>\n<li>Leukocytosis</li>\n<li>Cell Types: Neutrophils( multilobed nucleus), metamyelocytes (indented nucleus), myelocytes (D-shaped nucleus), and eosinophils (orange cells)</li>\n<li><strong>College girl/garden party appearance: </strong>Due to the variety of cell appearances</li>\n<li><strong>Shift to the Left:</strong> Presence of <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> cell types, mainly <span class=\"customMeta\" data-dictid=\"c219021c491692777189d289f1fc03\">immature</span> neutrophils, in the blood.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis for a 5-year-old boy who has weight loss, fever, and a painless swelling in his jaw area, with anaemia and lymphocytosis revealed by a CBC and biopsy findings shown in the accompanying image?\\", "options": [{"label": "A", "text": "Hodgkin’s disease", "correct": false}, {"label": "B", "text": "Acute lymphocytic leukemia", "correct": false}, {"label": "C", "text": "Chloroma", "correct": false}, {"label": "D", "text": "Burkitt’s lymphoma", "correct": true}], "correct_answer": "D. Burkitt’s lymphoma", "question_images": ["https://image.prepladder.com/content/HwuY4Tk5oUvl5jsAQu4a1746084393.png"], "explanation_images": ["https://image.prepladder.com/content/cPoBkFWnmU6FmHQ2WAyX1747908715.png", "https://image.prepladder.com/content/FlxFSeUgBVh986towXoU1746084421.png", "https://image.prepladder.com/content/f1MQGKhB3YaMjUbmLxQA1746084421.png", "https://image.prepladder.com/content/zS8qyVojC7LHmxhYD82w1746084421.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 38-year-old man presented with bleeding gums for 20 days. He has gingival hyperplasia and hepatosplenomegaly. On investigation, Hb-11 g/dL, platelet count-95,000 platelets/mm3, and WBC count-45000 cells/mm3. A bone marrow biopsy shows 100% cellularity, with many blast cells that are peroxidase-negative and non-specific esterase-positive . The most likely diagnosis is:", "options": [{"label": "A", "text": "Acute myeloid leukemia M2 (AML M2)", "correct": false}, {"label": "B", "text": "Acute myeloid leukemia M0 (AML M0)", "correct": false}, {"label": "C", "text": "Acute myeloid leukemia M5 (AML M5)", "correct": true}, {"label": "D", "text": "Acute myeloid leukemia M7 (AML M7)", "correct": false}], "correct_answer": "C. Acute myeloid leukemia M5 (AML M5)", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">leukemia</span> M5 (AML M5)\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td>AML M0 - <span class=\"customMeta\" data-dictid=\"9ab5f0308116927771814e1fcc72d6\">AML</span> undifferentiated</td>\n<td>Myeloperoxidase negative</td>\n</tr>\n<tr>\n<td>AML M2 - <span class=\"customMeta\" data-dictid=\"9ab5f0308116927771814e1fcc72d6\">AML</span> with maturation</td>\n<td>t(8;21) = RUNX1-RUNX1T1 fusion</td>\n</tr>\n<tr>\n<td>AML M3 - <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> promyelocytic leukemia</td>\n<td>t(15;17) = PML-RARA fusion</td>\n</tr>\n<tr>\n<td>AML M4 - <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> <span class=\"customMeta\" data-dictid=\"215dafdbad1692777193dcb48ddd63\">myelomonocytic</span> leukemia</td>\n<td>inv(16) = CBF-MYH fusion</td>\n</tr>\n<tr>\n<td>AML M5 - Acute monocytic leukemia</td>\n<td>Non-specific <span class=\"customMeta\" data-dictid=\"ca1d8cf43716927771875762739d8d\">esterase</span> positive</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most common cause of agranulocytosis?", "options": [{"label": "A", "text": "Marrow infiltration", "correct": false}, {"label": "B", "text": "Autoimmune", "correct": false}, {"label": "C", "text": "Drug toxicity", "correct": true}, {"label": "D", "text": "Radiation exposure", "correct": false}], "correct_answer": "C. Drug toxicity", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Drug\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Mononuclear Reed-Sternberg (RS) cells are seen in?", "options": [{"label": "A", "text": "Mixed cellular type HL", "correct": false}, {"label": "B", "text": "Nodular sclerosis HL", "correct": false}, {"label": "C", "text": "Lymphocyte-rich HL", "correct": true}, {"label": "D", "text": "Classical HL", "correct": false}], "correct_answer": "C. Lymphocyte-rich HL", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/0rS0B8yu7IEgWhQMrwdS1713172221.png", "https://image.prepladder.com/content/k0STMRxzzGnfBgyG2XMh1713172266.png"], "explanation": "<p>Correct Option C - Lymphocyte-rich HL\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td><strong>HL</strong></td>\n<td><strong>RS cell</strong></td>\n</tr>\n<tr>\n<td>Classical HL</td>\n<td><img src=\"https://image.prepladder.com/content/0rS0B8yu7IEgWhQMrwdS1713172221.png\" style=\"height:470px; width:500px\"/></td>\n</tr>\n<tr>\n<td>Nodular <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">sclerosis</span> HL</td>\n<td>\n<p>Lacunar cells</p>\n<p><img src=\"https://image.prepladder.com/content/k0STMRxzzGnfBgyG2XMh1713172266.png\" style=\"height:405px; width:500px\"/></p>\n</td>\n</tr>\n<tr>\n<td>Mixed <span class=\"customMeta\" data-dictid=\"aed7aaaa4516927771844cded86cdb\">cellularity</span> HL</td>\n<td>Classical RS cells (classical owl eye appearance)</td>\n</tr>\n<tr>\n<td>Lymphocyte-rich HL</td>\n<td>Mononuclear RS cells</td>\n</tr>\n<tr>\n<td>Lymphocyte-depleted HL</td>\n<td>Mummified RS cells</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 56 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 50-year-old man presents with complaints of fatigue, easy bruising, and recurrent nosebleeds over the past month. Laboratory investigations reveal leukopenia and thrombocytopenia. Peripheral blood smear examination demonstrates the presence of cells with Auer rods. In which stage of myelopoiesis are Auer rods typically found?", "options": [{"label": "A", "text": "Myeloblast", "correct": true}, {"label": "B", "text": "Myelocyte", "correct": false}, {"label": "C", "text": "Promyelocyte", "correct": false}, {"label": "D", "text": "Metamyelocyte", "correct": false}], "correct_answer": "A. Myeloblast", "question_images": ["https://image.prepladder.com/content/vSYJbzRcCnaCcT9ALuaR1737016328.png"], "explanation_images": ["https://image.prepladder.com/content/GqeSBLcUWkkPX15kBj9C1737016463.png", "https://image.prepladder.com/notes/yuBR89jH9WSQVIZ9ih081737653029.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old man presents with complaints of persistent fever, chills, and generalized weakness for the past week. Lab reports revealed leukocytosis with a left shift, and peripheral blood smear examination shows cells with kidney-shaped nuclei and parasites in ring forms inside RBCs. What is the cell called?", "options": [{"label": "A", "text": "Monocyte", "correct": true}, {"label": "B", "text": "Neutrophil", "correct": false}, {"label": "C", "text": "Basophil", "correct": false}, {"label": "D", "text": "Eosinophil", "correct": false}], "correct_answer": "A. Monocyte", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/06kfZPqUb4YWnEozGjCr1737016960.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-year-old child is brought up due to concerns about persistent fever, fatigue, and frequent infections over the past few weeks. There is generalised lymphadenopathy. Laboratory investigations reveal leukocytosis with lymphoblasts on peripheral smear examination. Which of the following stains are used to visualise lymphoblasts?", "options": [{"label": "A", "text": "Periodic Acid Schiff (PAS) stain", "correct": true}, {"label": "B", "text": "Myeloperoxidase stain", "correct": false}, {"label": "C", "text": "Sudan Black stain", "correct": false}, {"label": "D", "text": "Wright stain", "correct": false}], "correct_answer": "A. Periodic Acid Schiff (PAS) stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/BYrJlpNBIBAuZL2CX1th1737018524.png", "https://image.prepladder.com/content/au6AtVrJuY1WNH1ZiC0r1737018453.png", "https://image.prepladder.com/content/3qTnmBwEJ4hAC0Sk9Zac1737018471.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:644px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymphoblast</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Myeloblast</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Monoblasts</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cell Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No Auer rods</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Auer rods present</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lobulated <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> <span class=\"customMeta\" data-dictid=\"c9001edbf216927771860f3475b44c\">differentiate</span> it from myeloblasts.</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stains</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Periodic Acid Schiff (PAS) stain</li>\n<li>Acid <span class=\"customMeta\" data-dictid=\"65f1c4f3d4169277719505249503e0\">phosphatase</span> for T-lymphoblasts</li>\n</ul>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Myeloperoxidase <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> <strong> </strong><strong>(Option B)</strong></li>\n<li>Sudan Black <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> <strong>(Option C)</strong></li>\n</ul>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n<tr>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HPE</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p> </p>\n<p> </p>\n<p><img alt=\"\" data-author=\" VashiDonsk\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Leukemia\" data-tags=\"\" height=\"227\" src=\"https://image.prepladder.com/content/BYrJlpNBIBAuZL2CX1th1737018524.png\" width=\"200\"/></p>\n<p>Nucleus with clumped, dark purple chromatin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><img alt=\"\" data-author=\"Sarita Pradhan\" data-hash=\"\" data-license=\"CC BY 2.5\" data-source=\"https://www.researchgate.net/figure/Myeloblasts-and-plasma-cells-containing-Auer-rod-like-inclusions-Figure-2-Plasma-cell_fig1_295830389\" data-tags=\"\" height=\"152\" src=\"https://image.prepladder.com/content/au6AtVrJuY1WNH1ZiC0r1737018453.png\" width=\"200\"/></p>\n<p>Nucleus with opened up, homogeneous, lighter chromatin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Monoblast\" data-tags=\"\" height=\"186\" src=\"https://image.prepladder.com/content/3qTnmBwEJ4hAC0Sk9Zac1737018471.png\" width=\"200\"/></td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presents with persistent fatigue, significant weight loss, and night sweats over the past few months. Examination revealed massive splenomegaly. CBC shows elevated white blood cell count. A bone marrow biopsy confirms the diagnosis of CML. Which of the following types of leukocytosis is most commonly associated with this condition?", "options": [{"label": "A", "text": "Neutrophilia", "correct": false}, {"label": "B", "text": "Eosinophilia", "correct": false}, {"label": "C", "text": "Lymphocytosis", "correct": false}, {"label": "D", "text": "Basophilia", "correct": true}], "correct_answer": "D. Basophilia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:612px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type of Leukocytosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Causes</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neutrophilic <span class=\"customMeta\" data-dictid=\"515cde208f1692777191112bb2ff9e\">leukocytosis</span> <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Acute bacterial infections</strong> (e.g., <span class=\"customMeta\" data-dictid=\"f6332ef2d21692777196294f154e57\">pyogenic</span> organisms);</li>\n<li>Sterile <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> (e.g., tissue necrosis)</li>\n<li>Burns, <span class=\"customMeta\" data-dictid=\"340e5cd49c16927771917ee55b9e76\">Leukemoid</span> reactions</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Eosinophilic <span class=\"customMeta\" data-dictid=\"515cde208f1692777191112bb2ff9e\">leukocytosis</span> (eosinophilia) <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Allergic disorders</strong> (e.g., asthma);</li>\n<li>Parasitic infestations</li>\n<li>Hodgkin Lymphoma</li>\n<li>Hay fever</li>\n<li>Tropical <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">Pulmonary</span> eosinophilia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Basophilic <span class=\"customMeta\" data-dictid=\"515cde208f1692777191112bb2ff9e\">leukocytosis</span> (basophilia)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Myeloproliferative <span class=\"customMeta\" data-dictid=\"1622f69a94169277719372b76236ca\">neoplasm</span> (e.g., <strong>chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> leukaemia</strong>)</li>\n<li>Polycythaemia vera</li>\n<li>Myelofibrosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Monocytosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Chronic infections (e.g.,<strong> </strong><strong>tuberculosis</strong>);</li>\n<li>Autoimmune disorders (e.g., <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">lupus</span> erythematosus)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphocytosis <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Viral infections</strong><strong> </strong>(e.g., Epstein-Barr virus);</li>\n<li>Chronic <span class=\"customMeta\" data-dictid=\"fced475d231692777189effb72c5c7\">immunologic</span> <span class=\"customMeta\" data-dictid=\"7f3792072b1692777199fd8e2c4f59\">stimulation</span> (e.g., tuberculosis)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following cells with their respective images a) Hypersegmented neutrophil 1) b) Hyposegmented neutrophil 2) c) Dohle bodies 3) d) Alder Reilly anomaly 4)", "options": [{"label": "A", "text": "a-3, b-4, c-1, d-2", "correct": true}, {"label": "B", "text": "a-2, b-1, c-4, d-3", "correct": false}, {"label": "C", "text": "a-4, b-3, c-1, d-2", "correct": false}, {"label": "D", "text": "a-2, b-3, c-4, d-1", "correct": false}], "correct_answer": "A. a-3, b-4, c-1, d-2", "question_images": ["https://image.prepladder.com/notes/RMS7SEGxPZpHnAMVSdN71737655707.png", "https://image.prepladder.com/notes/fhQfrOWnqItcKNi7XXEd1737655835.png", "https://image.prepladder.com/notes/dvtvywizZfljB1q7cTIr1737654808.png", "https://image.prepladder.com/content/wyckA69cNzvGW5SrmrXl1737657566.png"], "explanation_images": ["https://image.prepladder.com/notes/dvtvywizZfljB1q7cTIr1737654808.png", "https://image.prepladder.com/content/op42Ps7vwszKEAfrDGU91737657584.png", "https://image.prepladder.com/notes/RMS7SEGxPZpHnAMVSdN71737655707.png", "https://image.prepladder.com/notes/fhQfrOWnqItcKNi7XXEd1737655835.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathological features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Explanation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypersegmented neutrophil</strong></p>\n<p><img alt=\"Hypersegmented neutrophil\" data-author=\"Ed Uthman\" data-hash=\"817\" data-license=\"CC BY 2.0\" data-source=\"https://en.wikipedia.org/wiki/Hypersegmented_neutrophil\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/dvtvywizZfljB1q7cTIr1737654808.png\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hypersegmented neutrophils are characterized by nuclear lobes equal to or more than 5.</li>\n<li>They are typically seen in conditions such as <strong>megaloblastic anaemia,</strong><strong> </strong>which is often due to deficiencies in vitamin B12 or folate.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hyposegmented neutrophil</strong></p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"988\" src=\"https://image.prepladder.com/content/op42Ps7vwszKEAfrDGU91737657584.png\" width=\"702\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hyposegmented neutrophils show bilobed or round <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> instead of the typical segmented appearance.</li>\n<li>This <span class=\"customMeta\" data-dictid=\"50a440f85816927771817d2fe50984\">anomaly</span> can occur as an inherited trait <strong>(Pelger-Huet anomaly)</strong><strong> </strong>or as a secondary finding in various syndromes such as <span class=\"customMeta\" data-dictid=\"29948ab80216927771932de0443c18\">Myelodysplastic</span> syndrome, where it is <span class=\"customMeta\" data-dictid=\"047f8930dd1692777197fed61e213c\">referred</span> to as Pseudo-Pelger-Huet anomaly.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dohle bodies</strong></p>\n<p><img alt=\"Dohle bodies\" data-author=\"Ibrahim Abukhiran Judy Jasser Sergei I Syrbu\" data-hash=\"818\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.researchgate.net/figure/Neutrophils-showing-toxic-granulation-Doehle-bodies-and-cytoplasmic-vacuolations_fig2_338618310\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/RMS7SEGxPZpHnAMVSdN71737655707.png\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Dohle bodies are cytoplasmic inclusions seen in neutrophils.</li>\n<li>Typically observed in patients with severe sepsis.</li>\n<li>Dohle bodies represent remnants of rough <span class=\"customMeta\" data-dictid=\"c01a5a8c221692777187daa368ab62\">endoplasmic reticulum</span> and are indicative of ongoing <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> stress or activation.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alder Reilly anomaly</strong></p>\n<p><img alt=\"Alder Reilly anomaly\" data-author=\"Nour Hisham Almozain Nasir Bakshi\" data-hash=\"819\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/a-Prominent-dark-staining-and-coarse-cytoplasmic-granules-in-polymorphonuclear_fig1_316069107\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/fhQfrOWnqItcKNi7XXEd1737655835.png\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Alder-Reilly <span class=\"customMeta\" data-dictid=\"50a440f85816927771817d2fe50984\">anomaly</span> is characterised by large cytoplasmic granules seen in neutrophils.</li>\n<li>This <span class=\"customMeta\" data-dictid=\"50a440f85816927771817d2fe50984\">anomaly</span> is associated with <strong>mucopolysaccharidoses,</strong> a group of inherited <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> disorders characterised by the accumulation of glycosaminoglycans in various tissues due to deficient lysosomal enzymes.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 17-year-old boy presented with complaints of a sore throat, fever, and extreme fatigue for the past two weeks. On examination, he has enlarged cervical lymph nodes and an enlarged spleen. A complete blood count reveals lymphocytosis with atypical lymphocytes and is diagnosed as infectious mononucleosis. Which of the following statements is NOT correct?", "options": [{"label": "A", "text": "Caused by Epstein-Barr Virus (EBV)", "correct": false}, {"label": "B", "text": "The Monospot test is a common diagnostic tool", "correct": false}, {"label": "C", "text": "Downey cells are characteristic histopathological features.", "correct": false}, {"label": "D", "text": "Also known as Haemophagocytic Lymphohistiocytosis.", "correct": true}], "correct_answer": "D. Also known as Haemophagocytic Lymphohistiocytosis.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Dyi5anrDKwEPzbuVfi4S1737089672.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old patient presents with fatigue, night sweats, and significant weight loss. Physical examination reveals generalized lymphadenopathy and splenomegaly. Blood tests show a markedly elevated white blood cell count. Based on the clinical scenario, which diagnosis is most likely if the bone marrow biopsy reveals over 20% blasts?", "options": [{"label": "A", "text": "Chronic Lymphocytic Leukemia (CLL)", "correct": false}, {"label": "B", "text": "Acute Myeloid Leukemia (AML)", "correct": true}, {"label": "C", "text": "Hodgkin’s Lymphoma (HL)", "correct": false}, {"label": "D", "text": "Non-Hodgkin’s Lymphoma (NHL)", "correct": false}], "correct_answer": "B. Acute Myeloid Leukemia (AML)", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/yw5a75HidpNZne0GB5hQ1737088249.png", "https://image.prepladder.com/content/hpUSQeMBy5YhcAlhfNHk1737088313.png", "https://image.prepladder.com/content/fjenXlI5DjsNJJNEalRu1737089547.png", "https://image.prepladder.com/content/InlJrinuNrdRjbU3rcJN1737089586.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leukaemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymphoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sites Involved</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> and blood</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymph nodes and <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">Lymphatic</span> tissues</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells involved</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Abnormal <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of White blood cells()</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Abnormal <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of lymphocytes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aetiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Genetic mutations, environmental factors, previous radiation exposure</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Genetic mutations, infections (e.g., <span class=\"customMeta\" data-dictid=\"e4f6b2922d16927771865030175a86\">EBV</span> for Hodgkin), immunosuppression</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Subtypes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute (ALL, AML) and Chronic (CLL, CML)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hodgkin <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> and Non-Hodgkin lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histopathology Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Abnormal blast cells in marrow; <span class=\"customMeta\" data-dictid=\"e2af3f82171692777182faad22cbdb\">Auer rods</span> in AML; <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> or <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> cell proliferation;</p>\n<p>Smudge cells in CLL</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reed-Sternberg cells in Hodgkin lymphoma; diverse cell <span class=\"customMeta\" data-dictid=\"2dcf62bc831692777192e737f2c4b0\">morphology</span> in Non-Hodgkin lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnosis is based on </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood tests, <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> biopsy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymph <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> biopsy, <span class=\"customMeta\" data-dictid=\"fe3220767716927771892419444041\">imaging</span> tests</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female is undergoing routine blood work. The laboratory technician uses different Vacutainers for various tests. Which Vacutainer colour is used for coagulation studies, such as PT and aPTT?", "options": [{"label": "A", "text": "No options available", "correct": false}], "correct_answer": "Unknown", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/PaKneiv8BgE2iRY6D8ls1739421001.png", "https://image.prepladder.com/content/kHqfIHZqA9h3bhHnQqXt1739421049.png", "https://image.prepladder.com/content/nfsJ1KURbpKnsKNc7xAt1739421144.png", "https://image.prepladder.com/content/JLnbRFll3leogqClnhrV1739420920.png", "https://image.prepladder.com/content/a2FVr0kIPVj5ckPZ70FT1739420859.png", "https://image.prepladder.com/notes/sd3YwppES9jV7XpfOnLR1737658052.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Colour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-coagulants</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Uses</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Purple/Lavender<strong> </strong><strong>(Option D)</strong></p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"129\" src=\"https://image.prepladder.com/content/PaKneiv8BgE2iRY6D8ls1739421001.png\" width=\"400\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>EDTA (Ca2+ chelating anticoagulant)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CBC, <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">Peripheral</span> Smear, ESR</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Light Blue (Option B) </strong></p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"322\" src=\"https://image.prepladder.com/content/kHqfIHZqA9h3bhHnQqXt1739421049.png\" width=\"200\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Citrate (Ca2+ chelating anticoagulant)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ESR, PT, aPTT</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Red <strong>(Option A)</strong></p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/nfsJ1KURbpKnsKNc7xAt1739421144.png\" width=\"200\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No anti-coagulant is added</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum studies (Proteins, enzymes, hormones)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Yellow</p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/JLnbRFll3leogqClnhrV1739420920.png\" width=\"150\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clot activator/Gel separator</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum studies (Proteins, enzymes, hormones)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Grey</p>\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/a2FVr0kIPVj5ckPZ70FT1739420859.png\" width=\"150\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sodium Fluoride</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood Glucose</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Green <strong>(Option C)</strong></p>\n<p><img alt=\"Green vacutainer tube\" data-author=\"NA\" data-hash=\"820\" data-license=\"NA\" data-source=\"NA\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/sd3YwppES9jV7XpfOnLR1737658052.png\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Heparin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ABG, Osmotic fragility, flow cytometry, immunophenotyping</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following diluting fluids correctly matches its specific use in haematology?", "options": [{"label": "A", "text": "Turk's Solution - Platelets", "correct": false}, {"label": "B", "text": "Hayem's Solution - WBCs", "correct": false}, {"label": "C", "text": "Gower's Solution - RBCs", "correct": true}, {"label": "D", "text": "1% Ammonium Oxalate - WBCs", "correct": false}], "correct_answer": "C. Gower's Solution - RBCs", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 19 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Identify the false statements regarding the amyloid. 1) It is a proteoglycan. 2) It is a misfolded protein seen intracellularly. 3) They show cross-β-pleated sheet conformation in light microscopy. 4) 95% of amyloid consists of fibril proteins. 5) It appears as an amorphous, basophilic, hyaline, extracellular substance.", "options": [{"label": "A", "text": "1,2,3", "correct": false}, {"label": "B", "text": "2,5", "correct": false}, {"label": "C", "text": "3,4", "correct": false}, {"label": "D", "text": "2,3,5", "correct": true}], "correct_answer": "D. 2,3,5", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/06lRu5udvdKjcP8RaDVo1737015827.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following. Condition Amyloid protein 1 Chronic inflammation i ATTR 2 Alzheimer’s disease ii AA 3 Familial amyloid polyneuropathy iii AIAPP 4 Diabetes mellitus iv Aβ", "options": [{"label": "A", "text": "1-i, 2-ii, 3-iii, 4-iv", "correct": false}, {"label": "B", "text": "1-ii, 2-iv, 3-iii, 4-i", "correct": false}, {"label": "C", "text": "1-ii, 2-iv, 3-i, 4-iii", "correct": true}, {"label": "D", "text": "1-iii, 2-ii, 3-i, 4-iv", "correct": false}], "correct_answer": "C. 1-ii, 2-iv, 3-i, 4-iii", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Amyloid</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Multiple <span class=\"customMeta\" data-dictid=\"aa6a0dfcb61692777193561ed10fac\">myeloma</span> and other <span class=\"customMeta\" data-dictid=\"b2b82438d6169277719287eb450079\">monoclonal</span> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell disorders</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AL</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AA</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alzheimer’s disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Aβ</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Familial <span class=\"customMeta\" data-dictid=\"51ad856e041692777181f80c9d507a\">amyloid</span> polyneuropathy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ATTR (mutated <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of transthyretin)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diabetes mellitus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AIAPP</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemodialysis associated amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Aβ<sub>2</sub>m</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Familial Meditterean Fever</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AA</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Senile <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ATTR (Increased quantity of TTR, no <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> is seen)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Medullary <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the thyroid</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Isolated atrial amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AANF</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male with a history of multiple myeloma in remission presents with fatigue, weight loss, and abdominal discomfort. He reports early satiety and a palpable firm mass in the left upper quadrant. Which finding is not associated with this condition?", "options": [{"label": "A", "text": "Sago's spleen", "correct": false}, {"label": "B", "text": "Lardaceous spleen", "correct": false}, {"label": "C", "text": "Carpal tunnel syndrome", "correct": false}, {"label": "D", "text": "Nephritic syndrome", "correct": true}], "correct_answer": "D. Nephritic syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/eTVYXSEolEPdYSePrIxN1737015872.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Organ </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Kidneys</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Most common and serious <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of organ involvement</strong>. <span class=\"customMeta\" data-dictid=\"51ad856e041692777181f80c9d507a\">Amyloid</span> in arterial/arteriolar walls causes <span class=\"customMeta\" data-dictid=\"0f670d10711692777190af4b12fac9\">ischemia</span> and <strong>kidney shrinkage.</strong></p>\n<p>Deposits primarily in glomeruli, leading to <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> narrowing and <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> obsolescence.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Liver</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Causes moderate to marked hepatomegaly.</p>\n<p>Amyloid deposits in the <strong>space of Disse</strong> encroach on <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> cells and sinusoids, leading to parenchymal replacement.</p>\n<p>Liver function is usually preserved despite extensive involvement.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Heart</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Can occur in <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> or <span class=\"customMeta\" data-dictid=\"f13bb39af816927771989e731b0502\">senile</span> amyloidosis.</p>\n<p>Amyloid deposits between <strong>myocardial fibres and subendocardially,</strong> causing pressure <span class=\"customMeta\" data-dictid=\"97ff5253fb169277718224c7b0faf8\">atrophy</span> and potential ECG abnormalities.</p>\n<p>Heart may appear enlarged or firm</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tongue</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nodular deposits cause macroglossia, known as tumour-forming <span class=\"customMeta\" data-dictid=\"51ad856e041692777181f80c9d507a\">amyloid</span> of the tongue</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Respiratory Tract</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involvement ranges from the <span class=\"customMeta\" data-dictid=\"80452d1746169277719165b097dc7a\">larynx</span> to small bronchioles, either focally or diffusely</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nerves</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peripheral and <span class=\"customMeta\" data-dictid=\"bd1c98736616927771820954b0a744\">autonomic</span> nerve involvement is seen in <span class=\"customMeta\" data-dictid=\"5dda3cc2ab1692777202b3b3c65bea\">familial</span> amyloidotic neuropathies.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old man with poorly controlled hypertension and diabetes presents with fatigue, shortness of breath, ankle swelling, hepatomegaly, and bilateral lower extremity oedema. Labs show proteinuria and elevated serum creatinine. Which staining technique is most appropriate to confirm the diagnosis?", "options": [{"label": "A", "text": "Periodic acid Schiff (PAS) stain", "correct": false}, {"label": "B", "text": "Masson trichome stain", "correct": false}, {"label": "C", "text": "Congo red stain", "correct": true}, {"label": "D", "text": "Oil red O", "correct": false}], "correct_answer": "C. Congo red stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/SjZsEjDbkkmF3acJ1wwt1737015936.png", "https://image.prepladder.com/content/SRG51l27K8we2fZ7rGG31737015920.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:587px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stains/technique</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Appearance</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Congo red</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most widely used and specific.</li>\n<li>Light microscopy: Salmon pink/red stains.</li>\n<li>Polarising microscopy: <strong>Apple-green birefringence.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>H & E</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Eosin & <span class=\"customMeta\" data-dictid=\"1cbb322f2c1692777188d48b3e3ef7\">hematoxylin</span> <span class=\"customMeta\" data-dictid=\"3b007026bd16927771997ae809b603\">staining</span> on light microscopy.</li>\n<li><strong>Amorphous</strong>, <strong>eosinophilic</strong>, <strong>extracellular</strong> substance.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Thioflavin T</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Fluorescent stain.</li>\n<li>Yellow colour under UV light.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Non-branching fibrils of indefinite length.</li>\n<li>Diameter: 7.5-10 nm.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>X-ray <span class=\"customMeta\" data-dictid=\"1ab23807771692777185b9e3f5a412\">crystallography</span> & <span class=\"customMeta\" data-dictid=\"82df9c600116927771907b7977a3b4\">infrared</span> spectroscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cross-β-pleated sheet conformation.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Methyl violet</strong></p>\n<p><strong>Crystal violet</strong></p>\n<p><strong>PAS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Amyloid positive.</li>\n</ul>\n<br/>\n\t\t\t </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 14 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 5-year-old boy presents with severe, chronic diarrhoea, failure to thrive, and a rash. His medical history includes a diagnosis of type 1 diabetes mellitus and thyroiditis. Laboratory tests show elevated levels of anti-enterocyte antibodies. Based on these findings, which mechanism is most likely impaired in this patient's condition?", "options": [{"label": "A", "text": "Central tolerance", "correct": false}, {"label": "B", "text": "Peripheral tolerance", "correct": true}, {"label": "C", "text": "Anergy", "correct": false}, {"label": "D", "text": "Hidden antigen", "correct": false}], "correct_answer": "B. Peripheral tolerance", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following processes in immune tolerance with their associated regulators. Process Regulators 1. Negative selection a. CD-28 2. Anergy b. FOXP3 3. Deletion by apoptosis c. AIRE 4. Suppression by regulatory T cells d. CD95", "options": [{"label": "A", "text": "1-c, 2-a, 3-d, 4-b.", "correct": true}, {"label": "B", "text": "1-a, 2-c, 3-d, 4-b.", "correct": false}, {"label": "C", "text": "1-c, 2-b, 3-d, 4-a.", "correct": false}, {"label": "D", "text": "1-a, 2-d, 3-c, 4-b.", "correct": false}], "correct_answer": "A. 1-c, 2-a, 3-d, 4-b.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is an immune-privileged site?", "options": [{"label": "A", "text": "Heart", "correct": false}, {"label": "B", "text": "Lung", "correct": false}, {"label": "C", "text": "Kidney", "correct": false}, {"label": "D", "text": "Testis", "correct": true}], "correct_answer": "D. Testis", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Brain</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood-brain barrier</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Eyes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood-ocular barrier</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Testes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood-testicular barrier</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old woman presents with a history of fatigue, fever, and weight loss. She also reports joint pain, swelling and a rash, as shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Dermatomyositis", "correct": false}, {"label": "B", "text": "Systemic Lupus Erythematosus", "correct": true}, {"label": "C", "text": "Psoriatic Arthritis", "correct": false}, {"label": "D", "text": "Ankylosing Spondylitis", "correct": false}], "correct_answer": "B. Systemic Lupus Erythematosus", "question_images": ["https://image.prepladder.com/content/uXOLcXirsaAjghP1Ha1Q1737004455.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 19-year-old woman presents with malaise, joint pain, and fever for the past 3 months. Physical examination shows a malar rash and mouth ulcers. She has significant proteinuria and decreased GFR. Which of the following antibodies are most specific and most sensitive, respectively?", "options": [{"label": "A", "text": "ANA, Anti ds DNA", "correct": false}, {"label": "B", "text": "Anti-Sm, ANA", "correct": true}, {"label": "C", "text": "Anti- Ro, Anti- La", "correct": false}, {"label": "D", "text": "Anti-beta-2-glycoprotein, Anticardiolipin", "correct": false}], "correct_answer": "B. Anti-Sm, ANA", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Marker/Antibody</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical Significance</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-Smith (anti-Sm) antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Highly specific for <span class=\"customMeta\" data-dictid=\"d9bf27b09416927771984cdc6c0bc4\">SLE</span> (<30% of patients)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-dsDNA antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Highly specific for <span class=\"customMeta\" data-dictid=\"d9bf27b09416927771984cdc6c0bc4\">SLE</span> (60-70% of patients);</strong> correlates with the disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antinuclear antibodies (ANA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Highly sensitive</strong> but not specific for SLE</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-Ro (SSA) and Anti-La (SSB) antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Found in <strong>SLE</strong> and <strong>Sjögren syndrome;</strong> associated with <strong>neonatal lupus</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-ribosomal-P antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Specific for <strong>neuropsychiatric manifestations</strong> in SLE</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-histone antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in <strong>drug-induced lupus;</strong> less specific for SLE</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Complements C3 and C4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low levels indicate <strong>complement consumption</strong> and disease activity</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman with SLE complains of red, frothy urine for the past two months despite being on treatment. Urine analysis shows RBCs and proteins. An image of renal biopsy is given below. Which of the following accurately describes the histopathological findings?", "options": [{"label": "A", "text": "Diffuse capillary wall thickening.", "correct": false}, {"label": "B", "text": "Wire loop lesions", "correct": true}, {"label": "C", "text": "Glomerular crescents", "correct": false}, {"label": "D", "text": "Kimmelstiel-Wilson lesion", "correct": false}], "correct_answer": "B. Wire loop lesions", "question_images": ["https://image.prepladder.com/content/KM3amVlzMbPCQZLL1aGo1737004615.png"], "explanation_images": ["https://image.prepladder.com/content/centyLOhbTjTbGI0Dg6G1737004690.png", "https://image.prepladder.com/content/fYyN0O0w2piHYePD4HgT1737004734.png", "https://image.prepladder.com/content/fquBj8wh7BdkQlCp0tMe1737004829.png", "https://image.prepladder.com/content/NT9lJnTspK0qhIeZOEQp1737004867.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Name</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>I</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Minimal mesangial nephritis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Immune complex deposition in the mesangium, identified by <span class=\"customMeta\" data-dictid=\"0b338fb71b16927771895a4ee94faa\">immunofluorescence</span> and by <span class=\"customMeta\" data-dictid=\"d416281a201692777187899c00aed8\">electron</span> microscopy, but without structural changes by light microscopy.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>II</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mesangial proliferative nephritis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mesangial cell <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> is often accompanied by mesangial <span class=\"customMeta\" data-dictid=\"14958c535b1692777192abd2a85abf\">matrix</span> accumulation, <span class=\"customMeta\" data-dictid=\"4f63eb15be169277718848d4b4978b\">granular</span> mesangial <span class=\"customMeta\" data-dictid=\"f8fab286571692777189bdfd087071\">immunoglobulin</span> deposits, and <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> without the involvement of <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> capillaries.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>III</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Focal nephritis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Involvement of <50% of glomeruli.</li>\n<li>The lesions may be <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">segmental</span> (affecting only a portion of the glomerulus) or global (involving the entire glomerulus).</li>\n<li>Affected <span class=\"customMeta\" data-dictid=\"c9bd75ce5f1692777188f7fe800061\">glomeruli</span> may exhibit <span class=\"customMeta\" data-dictid=\"e3d212ebd316927771996e0c472d4a\">swelling</span> and <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of endothelial and mesangial cells, <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> accumulation, <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> necrosis, and <span class=\"customMeta\" data-dictid=\"a2ce88e8a0169277718988f5bc31b8\">hyaline</span> thrombi.</li>\n<li>There is also often extra <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> associated with <span class=\"customMeta\" data-dictid=\"da6db7b0e21692777203c4075458d3\">focal</span> <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and <span class=\"customMeta\" data-dictid=\"0539eefe3f169277718547881d187d\">crescent</span> formation.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IV</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diffuse nephritis</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Diffuse_proliferative_lupus_nephritis_-a-_very_high_mag.jpg\" data-tags=\"\" height=\"150\" src=\"https://image.prepladder.com/content/centyLOhbTjTbGI0Dg6G1737004690.png\" width=\"224\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>M/C <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> in <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">lupus</span> nephritis.</li>\n<li>Shows the endothelial, mesangial, and epithelial cell <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> in Bowman's space.</li>\n<li>Subendothelial immune complex deposits cause<strong> <span class=\"customMeta\" data-dictid=\"57793361701692777184c3bc13c91d\">circumferential</span> thickening of the <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> wall</strong>, forming wire loop lesions</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>V</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Membranous nephritis</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Membranous_nephropathy_-_he_-_high_mag.jpg#/media/File:Membranous_nephropathy_-_pas_-_very_high_mag.jpg\" data-tags=\"\" height=\"138\" src=\"https://image.prepladder.com/content/fYyN0O0w2piHYePD4HgT1737004734.png\" width=\"200\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Diffuse thickening of the <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> walls due to deposition of <span class=\"customMeta\" data-dictid=\"94aff4fd141692777199a78b5ed2eb\">subepithelial</span> immune complexes.</li>\n<li>The immune complexes are usually accompanied by increased production of basement membrane-like material.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>VI</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Advanced <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> nephritis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Sclerosis of >90% of the <span class=\"customMeta\" data-dictid=\"c9bd75ce5f1692777188f7fe800061\">glomeruli</span> and represents end-stage <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> disease.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old woman has had persistent dry eyes and mouth for the past several months. She also reports difficulty in swallowing solid foods and occasional blurred vision. On examination, she has bilateral parotid gland enlargement. She has a history of rheumatoid arthritis. Which antibodies are specific for this disease?", "options": [{"label": "A", "text": "Anti-Sm", "correct": false}, {"label": "B", "text": "Anti La", "correct": true}, {"label": "C", "text": "Anti-Scl 70", "correct": false}, {"label": "D", "text": "Anti-U1 RNP", "correct": false}], "correct_answer": "B. Anti La", "question_images": ["https://image.prepladder.com/content/7gOvMOrRYeh46AJHsnbj1737005031.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autoantibody</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">Autoimmune</span> Condition</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-Sm (Smith) (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Systemic <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">lupus</span> erythematosus (SLE)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-Scl-70 (anti-topoisomerase I) (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">sclerosis</span> (scleroderma)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-U1 RNP (Ribonucleoprotein) (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mixed <span class=\"customMeta\" data-dictid=\"67e237a57c16927771859803f93ab3\">connective</span> tissue disease (MCTD)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old female complains of recurrent episodes of her fingers turning symmetrically white, which are associated with pain and a tingling sensation. This is worse when exposed to cold water and is relieved when she dips her fingers in warm water. The autoimmune panel is negative. What is the likely diagnosis?", "options": [{"label": "A", "text": "Primary Raynaud phenomenon", "correct": true}, {"label": "B", "text": "Dermatomyositis", "correct": false}, {"label": "C", "text": "Secondary Raynaud phenomenon", "correct": false}, {"label": "D", "text": "Calcinosis cutis", "correct": false}], "correct_answer": "A. Primary Raynaud phenomenon", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/RAuGFLZ50FbIVe4bFpyS1737005178.png", "https://image.prepladder.com/content/A0W0BuJeqnqQLtBidzWu1737005228.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary Raynaud's phenomenon</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Secondary Raynaud's phenomenon</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated diseases</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Yes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age at onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Younger (<30)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Older (>30)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nail fold capillaries</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large tortuous</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autoantibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative to low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Frequent</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Endothelial cell activation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Yes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Yes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Endothelial damage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Frequent</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Occlusions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Yes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Digital gangrene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rare (superficial)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Common</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>α2 <span class=\"customMeta\" data-dictid=\"0132a02ec31692777180a840765aff\">adrenergic</span> activity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Calcitonin gene-related peptide</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old woman complains of bilateral hand pain and stiffness, especially in the morning. On examination, you notice diffuse thickening and tightening of the skin all over her body. Echo showed pulmonary hypertension. Laboratory tests show positive Anti-SCL-70 antibodies What is the most likely diagnosis?", "options": [{"label": "A", "text": "Rheumatoid arthritis", "correct": false}, {"label": "B", "text": "Osteoarthritis", "correct": false}, {"label": "C", "text": "CREST syndrome", "correct": false}, {"label": "D", "text": "Systemic sclerosis", "correct": true}], "correct_answer": "D. Systemic sclerosis", "question_images": ["https://image.prepladder.com/content/3GKfvfaV7IeMOLu906iq1737005323.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents with progressive proximal muscle weakness over the past 6 months. On examination, the hip and shoulder girdle muscles have symmetrical weakness. Laboratory investigations show elevated serum creatine kinase (CK) levels. A muscle biopsy reveals endomysial inflammation with CD8+ T lymphocytes and muscle fiber necrosis. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Dermatomyositis", "correct": false}, {"label": "B", "text": "Myasthenia gravis", "correct": false}, {"label": "C", "text": "Inclusion body myositis", "correct": false}, {"label": "D", "text": "Polymyositis", "correct": true}], "correct_answer": "D. Polymyositis", "question_images": ["https://image.prepladder.com/content/kXLsnA2J1D7bxKtNcIG51737006913.png"], "explanation_images": ["https://image.prepladder.com/content/f085T5vHSqijpthdfl741737006975.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old woman presents with fatigue, muscle weakness, and joint pain. On examination, she has a rash over her cheeks, along with Raynaud's phenomenon and swollen fingers. Laboratory tests reveal positive anti-U1 RNP antibodies. Which of the following conditions is this patient most likely suffering from?", "options": [{"label": "A", "text": "Systemic lupus erythematosus", "correct": false}, {"label": "B", "text": "Scleroderma", "correct": false}, {"label": "C", "text": "Mixed connective tissue disease", "correct": true}, {"label": "D", "text": "Sjögren's syndrome", "correct": false}], "correct_answer": "C. Mixed connective tissue disease", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old woman is being evaluated for proximal muscle weakness. Which of the following is consistent with a diagnosis of polymyositis?", "options": [{"label": "A", "text": "CD4+ T cell infiltration in affected tissue", "correct": false}, {"label": "B", "text": "Endomysial inflammation", "correct": true}, {"label": "C", "text": "Associated with underlying malignancies", "correct": false}, {"label": "D", "text": "Vascular injury involved in pathogenesis", "correct": false}], "correct_answer": "B. Endomysial inflammation", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/MU6nxToQzCaQS275NEhK1737440674.png", "https://image.prepladder.com/content/6DOtsm6shN7pLRkfHOIW1737013379.png", "https://image.prepladder.com/content/DeLhWA3GFd0vIIUXbo0R1737013671.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 28-year-old female presents with fatigue, joint pain, and a rash. A blood test reveals positive anti-nuclear antibodies. Which of the following fluorescence patterns is most commonly associated with systemic lupus erythematosus (SLE)?", "options": [{"label": "A", "text": "No options available", "correct": true}], "correct_answer": "A. No options available", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Xk7ZOeAZOdrI1fQh2IOp1737014060.png", "https://image.prepladder.com/content/EqRqm72cWrI2oj5cBHU91737014070.png", "https://image.prepladder.com/content/59ZLBpuMatSHVg9S0otr1737014082.png", "https://image.prepladder.com/content/ReeVIwRbJduYdlGOb8dg1737014093.png", "https://image.prepladder.com/content/RUk7D7A9TT1WVXqyPCgS1737014390.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Homogeneous or <span class=\"customMeta\" data-dictid=\"89275101301692777186567d1912a0\">diffuse</span> <span class=\"customMeta\" data-dictid=\"3b007026bd16927771997ae809b603\">staining</span> of <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> </strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antibodies <span class=\"customMeta\" data-dictid=\"092583d1b41692777197a506409267\">reactive</span> with dsDNA, nucleosomes, and histones, and is common in <strong>systemic <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">lupus</span> erythematosus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Simon Caulton \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Antinuclear_antibody#/media/File:DsDNA_antibodies.jpg\" data-tags=\"\" height=\"861\" src=\"https://image.prepladder.com/content/Xk7ZOeAZOdrI1fQh2IOp1737014060.png\" width=\"1000\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Speckled pattern</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antibodies against various nuclear antigens, including Sm and RNPs</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Michael Mahler, Marvin J. Fritzler\" data-hash=\"\" data-license=\"CC BY\" data-source=\"https://onlinelibrary.wiley.com/doi/10.1155/2012/494356\" data-tags=\"\" height=\"800\" src=\"https://image.prepladder.com/content/EqRqm72cWrI2oj5cBHU91737014070.png\" width=\"800\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nucleolar pattern</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antibodies against nucleolar proteins</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Simon Caulton \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:ANA_NUCLEOLAR_3.jpg\" data-tags=\"\" height=\"974\" src=\"https://image.prepladder.com/content/59ZLBpuMatSHVg9S0otr1737014082.png\" width=\"1000\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-centromere antibodies (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Systemic sclerosis, Sjögren syndrome, and other diseases</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Simon Caulton \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Anti-centromere_antibodies#/media/File:CENTROMERE.jpg\" data-tags=\"\" height=\"839\" src=\"https://image.prepladder.com/content/ReeVIwRbJduYdlGOb8dg1737014093.png\" width=\"1000\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a feature of dermatomyositis?", "options": [{"label": "A", "text": "No options available", "correct": false}], "correct_answer": "Unknown", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/sM4Hu1JqBYd17CPllRWj1737014937.png", "https://image.prepladder.com/content/vJxZSoTWOWOzGsrMeTmE1737014956.png", "https://image.prepladder.com/content/TlXObh6jNYi8tstBRuEU1737014992.png", "https://image.prepladder.com/content/uIvphRYcEj8FWsqVr4cA1737015008.png", "https://image.prepladder.com/content/OdLfb1eRazz8Zyp9FBqO1737015028.png", "https://image.prepladder.com/content/rIZfFfg0ceIYWWk3T7W81737015054.png", "https://image.prepladder.com/content/zPxpXuGH5iFknhVWcfpz1737015080.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "An 8-month-old male infant presents with a history of severe, recurrent bacterial infections. On physical examination, the tonsils were found to be absent. Peripheral blood examination reveals an absence of B cells, while the T cell count is normal. Additionally, serum analysis reveals undetectable levels of immunoglobulins (IgG, IgA, and IgM). Which of the following most accurately explains the molecular mechanism responsible for this patient's immunodeficiency?", "options": [{"label": "A", "text": "BTK gene mutation", "correct": true}, {"label": "B", "text": "RAG1/2 gene mutation", "correct": false}, {"label": "C", "text": "CD40L deficiency", "correct": false}, {"label": "D", "text": "BAFF receptor abnormality", "correct": false}], "correct_answer": "A. BTK gene mutation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In a pediatric clinic, a six-year-old male presents with a history of frequent respiratory and skin infections, eczema flare-ups, and macrothrombocytopenia. Given these symptoms, which genetic evaluation method would be the most effective for confirming the suspected diagnosis?", "options": [{"label": "A", "text": "WASP gene mutation analysis", "correct": true}, {"label": "B", "text": "ANA titer", "correct": false}, {"label": "C", "text": "FISH", "correct": false}, {"label": "D", "text": "B cell tyrosine kinase activity detection", "correct": false}], "correct_answer": "A. WASP gene mutation analysis", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Assertion: Patients with Common Variable Immunodeficiency (CVID) commonly present with recurrent respiratory infections, gastrointestinal issues, and autoimmune disorders. Reason: Defects in the BTK gene lead to impaired B cell signaling, resulting in decreased maturation of B cells from pre-B-cells.", "options": [{"label": "A", "text": "Both Assertion and Reason are true, and Reason is the correct explanation for Assertion", "correct": false}, {"label": "B", "text": "Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion", "correct": true}, {"label": "C", "text": "Assertion is true, but Reason is false", "correct": false}, {"label": "D", "text": "Assertion is false, but Reason is true", "correct": false}], "correct_answer": "B. Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/GdVA10GR6wAoW2kmCZ4o1737027200.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Bruton's hypogammaglobulinemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>CVID</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>BTK gene defect</li>\n<li>Common in boys (X-linked)</li>\n<li>Manifests after 6 months of age</li>\n<li>B cell defect</li>\n<li>Hypoplastic <span class=\"customMeta\" data-dictid=\"a0e5fdc156169277718879843a6ede\">germinal</span> centers</li>\n<li>Patients are <span class=\"customMeta\" data-dictid=\"55691242bb1692777199360f64cb67\">susceptible</span> to infections by Haemophilus influenzae, Streptococcus pneumoniae, or Staphylococcus aureus.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>BAFF gene defect</li>\n<li>Occurs in both boys & girls</li>\n<li>Manifests in childhood or adolescence</li>\n<li>B cell and T cell defect</li>\n<li>Hyperplastic <span class=\"customMeta\" data-dictid=\"a0e5fdc156169277718879843a6ede\">germinal</span> centers</li>\n<li>Patients are <span class=\"customMeta\" data-dictid=\"55691242bb1692777199360f64cb67\">susceptible</span> to persistent diarrhoea caused by <strong>G. lamblia.</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/bMlKfs3JNca7yCMy0Czu1745346155.mp3", "video": ""}, {"text": "A 35-year-old male with a known history of selective IgA deficiency receives a blood transfusion during surgery. Shortly after the transfusion, he develops acute allergic reactions, including hives and difficulty breathing. Given his IgA deficiency, which blood products should have been considered to minimize the risk of such complications?", "options": [{"label": "A", "text": "Standard red blood cells with no modification", "correct": false}, {"label": "B", "text": "Plasma products that are rich in IgA", "correct": false}, {"label": "C", "text": "Washed red blood cells", "correct": true}, {"label": "D", "text": "Fresh frozen plasma", "correct": false}], "correct_answer": "C. Washed red blood cells", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 7-year-old child presents with recurrent skin abscesses and pneumonia. He also has a history of skeletal abnormalities, including scoliosis and delayed shedding of primary teeth. His lab work shows elevated serum IgE levels. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Job syndrome", "correct": true}, {"label": "B", "text": "Chronic granulomatous disease", "correct": false}, {"label": "C", "text": "Wiskott-Aldrich syndrome", "correct": false}, {"label": "D", "text": "Ataxia-Telangiectasia", "correct": false}], "correct_answer": "A. Job syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 4-year-old boy presents with recurrent bacterial infections, including pneumonia and otitis media. He also has a history of chronic diarrhoea. Laboratory tests reveal elevated IgM levels with markedly reduced IgG, IgA, and IgE levels. Flow cytometry shows normal numbers of CD19+ B cells and CD3+ T cells. Genetic testing reveals a mutation in the CD40L gene. Which of the following pathogens is the patient most at risk for developing severe infections with?", "options": [{"label": "A", "text": "Streptococcus pneumoniae", "correct": false}, {"label": "B", "text": "Haemophilus influenzae", "correct": false}, {"label": "C", "text": "Staphylococcus aureus", "correct": false}, {"label": "D", "text": "Pneumocystis jirovecii", "correct": true}], "correct_answer": "D. Pneumocystis jirovecii", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ZSjBD5mTUsctq2Y9fDNR1737026940.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with autoimmune hemolytic anemia, thrombocytopenia and neutropenia. Based on the flow cytometry findings, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Paroxysmal Nocturnal Hemoglobinuria", "correct": false}, {"label": "B", "text": "Hyper IgE syndrome", "correct": false}, {"label": "C", "text": "Hyper IgM syndrome", "correct": true}, {"label": "D", "text": "Glanzmann Thrombasthenia", "correct": false}], "correct_answer": "C. Hyper IgM syndrome", "question_images": ["https://image.prepladder.com/content/i5jYKr3xkhCwJYvsStJD1737026646.png"], "explanation_images": ["https://image.prepladder.com/content/1JkqVWNM5A3fR3lHcR671737026717.png", "https://image.prepladder.com/content/wN4UknpKzDRJuKiXNdIF1737026779.png", "https://image.prepladder.com/content/bBLF11UT6zDMZ3bQrRfQ1737026833.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Quadrant 1 (green)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative for <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> A, positive for <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> B</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Quadrant 2 (purple)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Negative for both antigens</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Quadrant 3 (yellow)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive for both antigens</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Quadrant 4 (red)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive for <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> A, negative for <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> B</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 7-year-old boy is brought to the pediatric clinic due to recurrent infections, including pneumonia and abscesses. He has a history of photophobia and exhibits partial oculocutaneous albinism. On examination, he has notable nystagmus and ataxia. Genetic testing confirms a defect in the LYST gene. Which of the following laboratory findings would be most characteristic of this patient's condition?", "options": [{"label": "A", "text": "Decreased immunoglobulin levels", "correct": false}, {"label": "B", "text": "Elevated eosinophil count", "correct": false}, {"label": "C", "text": "Presence of giant granules in leukocytes", "correct": true}, {"label": "D", "text": "Elevated platelet count", "correct": false}], "correct_answer": "C. Presence of giant granules in leukocytes", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Wc9F2UkBgRgYkAGlBn7R1737026538.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following. i) X-linked Agammaglobulinemia a) WAS ii) Job syndrome b) LYST iii) Wiskott-Aldrich syndrome c) STAT3 iv) Ataxia Telangiectasia d) BTK v) Chediak-Higashi syndrome e) ATM", "options": [{"label": "A", "text": "i-d, ii-c, iii-b, iv-e, v-a", "correct": false}, {"label": "B", "text": "i-c, ii-d, iii-a, iv-e, v-b", "correct": false}, {"label": "C", "text": "i-d, ii-b, iii-a, iv-e, v-c", "correct": false}, {"label": "D", "text": "i-d, ii-c, iii-a, iv-e, v-b", "correct": true}], "correct_answer": "D. i-d, ii-c, iii-a, iv-e, v-b", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>X-linked (Bruton) Agammaglobulinemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>BTK</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Job syndrome (Hyper <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> syndrome)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>STAT3</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Wiskott-Aldrich syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>WAS</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ataxia Telangiectasia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ATM</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chediak-Higashi syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LYST</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defects in <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">Leukocyte</span> Function</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leukocyte <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defective <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> because of mutations in the β chain of CD11/CD18 integrins</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leukocyte <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defective <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> because of mutations in fucosyl <span class=\"customMeta\" data-dictid=\"2288cbf3741692777200318d2f5b39\">transferase</span> required for the <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> of sialylated <span class=\"customMeta\" data-dictid=\"b7e6fc8e42169277719455371c3c8b\">oligosaccharide</span> (receptor for selectins)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leukocyte <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> 3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LAD-III is caused by mutations in the FERMT3 gene, which encodes kindlin-3, a cytoskeletal protein. These mutations disrupt the signalling of integrins on platelets and leukocytes, which impairs <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> adhesion</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chédiak-Higashi syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autosomal recessive</strong>, decreased <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> functions because of mutations affecting protein (LYST) involved in lysosomal <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> traffic.<strong> <span class=\"customMeta\" data-dictid=\"144d78fe4816927771852de984c62f\">Defective</span> <span class=\"customMeta\" data-dictid=\"8fcf5b7a1f1692777195dd42c8b518\">phagolysosome</span> formation.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic <span class=\"customMeta\" data-dictid=\"9e1f97f6ad169277718805c2dd35c1\">granulomatous</span> disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Decreased <span class=\"customMeta\" data-dictid=\"60d563fe241692777194203742bf5b\">oxidative</span> burst</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Myeloperoxidase deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Decreased <span class=\"customMeta\" data-dictid=\"04f4b6dbf71692777192ca0c4f70fa\">microbial</span> killing because of <span class=\"customMeta\" data-dictid=\"144d78fe4816927771852de984c62f\">defective</span> MPO-H<sub>2</sub>O<sub>2</sub> system</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defects in the <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">Complement</span> System</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>C2, C4 deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defective classical <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> results in <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> resistance to infection and <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> <span class=\"customMeta\" data-dictid=\"3a3fb1b8a816927771840e6a344cc0\">clearance</span> of immune complexes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>C3 deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defects in all <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> functions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Deficiency of <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> regulatory proteins</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Excessive <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> activation; clinical syndromes include <span class=\"customMeta\" data-dictid=\"5f26e5a9e916927771816a407f7545\">angioedema</span> (C1 <span class=\"customMeta\" data-dictid=\"b5fb56a28b1692777190396ae8b625\">inhibitor</span> deficiency), <span class=\"customMeta\" data-dictid=\"cd15fe58221692777194fbb9eec8d1\">paroxysmal</span> <span class=\"customMeta\" data-dictid=\"ddeb334a351692777188795bb090ef\">hemoglobinuria</span> (CD55/59 deficiency), others</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SCID</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>X-linked (most common): <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> in the common γ-chain (γc) subunit of <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> receptors</li>\n<li><strong>Autosomal recessive</strong>: <span class=\"customMeta\" data-dictid=\"7cdf82ff98169277718029b0e108aa\">ADA</span> <span class=\"customMeta\" data-dictid=\"0f160e4e42169277718771b715516a\">enzyme</span> deficiency</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>X-Linked <span class=\"customMeta\" data-dictid=\"2154ae19fc1692777180ad72742d0b\">Agammaglobulinemia</span> (Bruton Agammaglobulinemia)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>BTK gene mutation</li>\n<li><strong>X-linked recessive</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>DiGeorge Syndrome (Thymic Hypoplasia)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>CATCH22 </strong>(mnemonic)<strong> </strong>- <strong>C</strong>ardiac defects, <strong>A</strong>bnormal facies,<strong> T</strong>hymic hypoplasia,<strong> C</strong>left palate, <strong>H</strong>ypocalcemia (tetany) resulting from lack of parathyroids, <strong>22</strong>q11 microdeletion</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hyper <span class=\"customMeta\" data-dictid=\"e4a6fd7fbb169277718986a699e800\">IgM</span> syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Defective CD40L on <span class=\"customMeta\" data-dictid=\"ac6bc889e41692777188b238dbb529\">helper T cells</span> → class switching defect</li>\n<li><strong>X-linked recessive</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Common variable immunodeficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cause unknown</li>\n<li>Defects in B and T cells</li>\n<li>Defective B cell: BAFF gene defect</li>\n<li>Defective T cell: ICOS gene defect</li>\n<li>Diagnosed in late childhood or adulthood</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Isolated <span class=\"customMeta\" data-dictid=\"68bae589ad169277718918627baff4\">IgA</span> Deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Caused by impaired <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> of <span class=\"customMeta\" data-dictid=\"2241e1d9a11692777193d3ceb43d49\">naïve</span> <span class=\"customMeta\" data-dictid=\"058bb8f0c3169277718218493d67ba\">B lymphocytes</span> to IgA-producing <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Wiskott-Aldrich Syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mutations in the gene located at Xp11.23 that encodes <span class=\"customMeta\" data-dictid=\"f17e3cf4981692777202d2d8b0da1c\">Wiskott-Aldrich syndrome</span> protein (WASP)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ataxia Telangiectasia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Autosomal recessive</strong></li>\n<li>ATM gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> located on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 11</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/0K5EXHXlq9vXnYTKIR8H1747309993.mp3", "video": ""}, {"text": "In a pediatric clinic, a six-year-old male presents with a history of frequent respiratory and skin infections, eczema flare-ups, and macrothrombocytopenia. Given these symptoms, which genetic evaluation method would be the most effective for confirming the suspected diagnosis?", "options": [{"label": "A", "text": "WASP gene mutation analysis", "correct": true}, {"label": "B", "text": "ANA titer", "correct": false}, {"label": "C", "text": "FISH", "correct": false}, {"label": "D", "text": "B cell tyrosine kinase activity detection", "correct": false}], "correct_answer": "A. WASP gene mutation analysis", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old patient presents with a history of recurrent respiratory infections, chronic diarrhoea, and autoimmune manifestations. Laboratory investigations reveal low levels of serum immunoglobulins (IgG, IgA, and IgM). Which of the following immunodeficiency disorders is most likely associated with these clinical findings?", "options": [{"label": "A", "text": "X-linked agammaglobulinemia (XLA)", "correct": false}, {"label": "B", "text": "Common variable immunodeficiency (CVID)", "correct": true}, {"label": "C", "text": "Hyper IgM syndrome", "correct": false}, {"label": "D", "text": "Severe Combined Immunodeficiency (SCID)", "correct": false}], "correct_answer": "B. Common variable immunodeficiency (CVID)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-year-old child presents with recurrent bacterial infections, delayed wound healing, and poor pus formation. Genetic testing reveals a mutation in the SLC35C1 gene, leading to the deficient synthesis of Sialyl Lewis X (SLex). Which of the following is the most likely consequence of this deficiency?", "options": [{"label": "A", "text": "Impaired leukocyte adhesion", "correct": true}, {"label": "B", "text": "Defective opsonisation", "correct": false}, {"label": "C", "text": "Reduced chemokine production", "correct": false}, {"label": "D", "text": "Increased neutrophil apoptosis", "correct": false}], "correct_answer": "A. Impaired leukocyte adhesion", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leukocyte <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defective <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> adhesion</strong> because of mutations in the β chain of CD11/CD18 integrins</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leukocyte <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defective <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> because of mutations in fucosyl <span class=\"customMeta\" data-dictid=\"2288cbf3741692777200318d2f5b39\">transferase</span> required for the <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> of sialylated <span class=\"customMeta\" data-dictid=\"b7e6fc8e42169277719455371c3c8b\">oligosaccharide</span> (receptor for selectins)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leukocyte <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> 3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LAD-III is caused by mutations in the FERMT3 gene, which encodes kindlin-3, a cytoskeletal protein. These mutations disrupt the signalling of integrins on platelets and leukocytes, which impairs <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> adhesion</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 2-year-old child presents with recurrent bacterial infections, delayed wound healing, and poor pus formation despite having a normal leukocyte count. Upon further investigation, a defect is identified in the integrin-mediated adhesion of leukocytes. Which of the following conditions is most likely responsible for this clinical presentation?", "options": [{"label": "A", "text": "Chronic granulomatous disease (CGD)", "correct": false}, {"label": "B", "text": "Leukocyte Adhesion Deficiency Type 1 (LAD-1)", "correct": true}, {"label": "C", "text": "Hyper IgM syndrome", "correct": false}, {"label": "D", "text": "Severe Combined Immunodeficiency (SCID)", "correct": false}], "correct_answer": "B. Leukocyte Adhesion Deficiency Type 1 (LAD-1)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following disorders is characterised by absent tonsils and lymph nodes, markedly decreased levels of serum immunoglobulins (particularly IgG, IgA, and IgM), and a lack of mature B cells in peripheral blood?", "options": [{"label": "A", "text": "Common Variable Immunodeficiency (CVID)", "correct": false}, {"label": "B", "text": "Severe Combined Immunodeficiency (SCID)", "correct": false}, {"label": "C", "text": "X-linked Agammaglobulinemia (XLA)", "correct": true}, {"label": "D", "text": "Hyper-IgM Syndrome", "correct": false}], "correct_answer": "C. X-linked Agammaglobulinemia (XLA)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old male presents with progressive difficulty in coordinating movements, slurred speech, and frequent infections. Physical examination reveals the findings shown in the image below and dysarthria. Laboratory investigations show decreased levels of serum IgA, IgG, and IgE. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Hereditary spastic paraplegia", "correct": false}, {"label": "B", "text": "Friedreich ataxia", "correct": false}, {"label": "C", "text": "Ataxia Telangiectasia", "correct": true}, {"label": "D", "text": "Spinocerebellar ataxia type 1", "correct": false}], "correct_answer": "C. Ataxia Telangiectasia", "question_images": ["https://image.prepladder.com/content/P7CKymiyYnfbUB9MDkAt1737363249.png"], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/FiG6irHm66qR7u9df01O1746450695.mp3", "video": ""}, {"text": "An 8-month-old infant is brought to the clinic with a history of persistent, severe respiratory infections since birth. Physical examination reveals failure to thrive and absent tonsils and lymph nodes. The Child is diagnosed with adenosine deaminase deficiency; what is the most appropriate diagnosis?", "options": [{"label": "A", "text": "DiGeorge Syndrome", "correct": false}, {"label": "B", "text": "X-linked Agammaglobulinemia (XLA)", "correct": false}, {"label": "C", "text": "Hyper-IgM Syndrome", "correct": false}, {"label": "D", "text": "Severe Combined Immunodeficiency (SCID)", "correct": true}], "correct_answer": "D. Severe Combined Immunodeficiency (SCID)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 4-year-old child presents with recurrent infections, congenital heart defects, and facial dysmorphisms, including a long face with a prominent nasal bridge. Genetic testing reveals a microdeletion on chromosome 22q11. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Down syndrome", "correct": false}, {"label": "B", "text": "Turner syndrome", "correct": false}, {"label": "C", "text": "DiGeorge syndrome", "correct": true}, {"label": "D", "text": "Cri-du-chat syndrome", "correct": false}], "correct_answer": "C. DiGeorge syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 27 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "B-cells are induced to produce IgE by which of the following?", "options": [{"label": "A", "text": "IL-2", "correct": false}, {"label": "B", "text": "IL-4", "correct": true}, {"label": "C", "text": "IL-1", "correct": false}, {"label": "D", "text": "IL-6", "correct": false}], "correct_answer": "B. IL-4", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Interleukins</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Role</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>IL-4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Key <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> in driving the allergic response</li>\n<li>Enhances Ig E-mediated reaction</li>\n<li><strong>Stimulates B cells to undergo class switching to IgE</strong> and promotes the expansion of Th2 cells</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>IL-5</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Development and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of eosinophils→ Recruited to the site of <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> exposure→ Release <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> mediators and enzymes→ Tissue damage and inflammation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>IL-13</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Amplifies <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> production</li>\n<li>Acts on epithelial cells to stimulate <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> secretion</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>IL-10</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Anti-inflammatory cytokine</li>\n<li>Inhibits <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> production by Th1 cells and macrophages.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A Rh-negative mother delivered an Rh-positive baby, and Coomb’s test was positive for the baby. What is the mechanism of hypersensitivity seen in this scenario?", "options": [{"label": "A", "text": "Antigen-dependent cellular cytotoxicity", "correct": false}, {"label": "B", "text": "Antibody-dependent cellular cytotoxicity", "correct": true}, {"label": "C", "text": "Antigen-antibody immune complex deposition", "correct": false}, {"label": "D", "text": "CD4 T-cell-mediated cytokine release", "correct": false}], "correct_answer": "B. Antibody-dependent cellular cytotoxicity", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:675px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #999999; border-left:1px solid #999999; border-right:1px solid #999999; border-top:1px solid #999999; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Mechanisms of <span class=\"customMeta\" data-dictid=\"bd04ba63bc1692777201f54e0ee060\">Type II</span> hypersensitivity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:1px solid #999999; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:1px solid #999999; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Examples</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #999999; border-left:1px solid #999999; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<p><strong>Opsonisation and <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">Phagocytosis</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<p><strong>IgG</strong> antibodies coat cells, helping phagocytes recognise circulating antigen-opsonin complexes <strong>through Fc receptors</strong> or <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> activation, <strong>leading to phagocytosis.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<ul>\n<li>Autoimmune <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia</li>\n<li>Immune thrombocytopenic purpura</li>\n<li><strong>Rh <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> disease of the newborn</strong>.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #999999; border-left:1px solid #999999; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<p><strong>Complement activation</strong></p>\n<p><strong>and inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<ul>\n<li>Antibody deposition in <strong>extracellular</strong> tissues triggers <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> rather than <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> or cell lysis.</li>\n<li>The deposited antibodies <span class=\"customMeta\" data-dictid=\"dddc752e1716927771807f985bb8bb\">activate</span> the <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> system, attracting neutrophils and monocytes via their Fc receptors.</li>\n<li>Activated leukocytes release enzymes, causing tissue damage.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<ul>\n<li>Goodpasture syndrome.</li>\n<li>Acute rheumatic fever.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #999999; border-left:1px solid #999999; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<p><strong>Antibody-dependent</strong></p>\n<p><strong>cellular <span class=\"customMeta\" data-dictid=\"569eae3b3516927771850ba9123b99\">cytotoxicity</span> (ADCC)</strong><br/>\n\t\t\t </p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<p><strong>Natural killer cells</strong> bind to antibody-antigen complexes, inducing apoptotic cell death.</p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<ul>\n<li>Pernicious anemia</li>\n<li>Insulin resistant diabetes</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #999999; border-left:1px solid #999999; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<p><strong>Antibody-mediated <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> <span class=\"customMeta\" data-dictid=\"3662597407169277718640a12868f5\">dysfunction</span> (non-cytotoxic)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<p>Antibodies physically impair or dysregulate <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> function by binding to cell surface receptors. This includes both <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> (e.g., <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> hormone <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> in Graves disease) and <span class=\"customMeta\" data-dictid=\"f03ca2d2a716927771901227bc175a\">inhibition</span> (e.g., <span class=\"customMeta\" data-dictid=\"a79a62c36e169277718062f9630d56\">acetylcholine</span> <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> in <span class=\"customMeta\" data-dictid=\"6fa809ad22169277719323eaa30f1e\">Myasthenia</span> gravis).</p>\n</td>\n<td style=\"border-bottom:1px solid #999999; border-left:none; border-right:1px solid #999999; border-top:none; vertical-align:top\">\n<ul>\n<li>Graves disease</li>\n<li><strong>Myasthenia gravis</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:365px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Mnemonic: My <span class=\"customMeta\" data-dictid=\"a3c99b36b6169277718332b20cc393\">Blood Group</span> Is Rh Positive</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>My</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Myasthenia Gravis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Blood<strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Blood <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> reaction</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Group<strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Good pasture syndrome,</p>\n<p>Graves disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Is<strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Immune <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anaemia,</p>\n<p>Immune thrombocytopenic purpura</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>R<strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Rh incompatibility</strong>,</p>\n<p>Rheumatic fever</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>H</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hyperacute transplant rejection</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Positive</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Pemphigus (Bullous),<strong> </strong></p>\n<p>Pernicious Anemia</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Type II <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> (Antibody-mediated)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Opsonisation and <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> activation→Phagocytosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Transfusion reaction, <strong>erythroblastosis fetalis</strong>, AIHA, ITP.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Complement, F<sub>c</sub></strong><strong> receptor-mediated →Inflammation.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Goodpasture syndrome, <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> Rheumatic fever, <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> rejections, vasculitis.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Antibody-mediated <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> dysfunctions.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Myasthenia gravis, <span class=\"customMeta\" data-dictid=\"73d23b64831692777195fed10389ac\">Pemphigus</span> Vulgaris, Graves disease, <span class=\"customMeta\" data-dictid=\"5cc1ea37091692777195fbd0aa687b\">Pernicious</span> Anemia, Insulin-resistant diabetes, <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">Hemolytic</span> disease of the newborn.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions is associated with hypocalcemia, thymic hypoplasia, cardiac abnormalities, and deletion of chromosome 22q11.2?", "options": [{"label": "A", "text": "Williams syndrome", "correct": false}, {"label": "B", "text": "Pitt syndrome", "correct": false}, {"label": "C", "text": "DiGeorge syndrome", "correct": true}, {"label": "D", "text": "Cri-du-chat syndrome", "correct": false}], "correct_answer": "C. DiGeorge syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/qXdvLOuCU3RdckW35wPJ1747908478.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 24-year-old female patient presented with a malar rash, recurrent oral ulcers, and multiple joint pains. She has a relevant past history and does not take any medication. Upon further investigations, thrombocytopenia was seen, and the anti-Smith (anti-Sm) antibody was positive. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Scleroderma", "correct": false}, {"label": "B", "text": "Sjögren syndrome", "correct": false}, {"label": "C", "text": "Systemic lupus erythematosus (SLE)", "correct": true}, {"label": "D", "text": "Rheumatoid arthritis", "correct": false}], "correct_answer": "C. Systemic lupus erythematosus (SLE)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:676px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Marker/Antibody</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Clinical Significance</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-Smith (anti-Sm) antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Highly specific for <span class=\"customMeta\" data-dictid=\"d9bf27b09416927771984cdc6c0bc4\">SLE</span> (<30% of patients)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-dsDNA antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Highly specific for <span class=\"customMeta\" data-dictid=\"d9bf27b09416927771984cdc6c0bc4\">SLE</span> (60-70% of patients);</strong> correlates with the disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Antinuclear antibodies (ANA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Highly sensitive</strong> but not specific for SLE</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-Ro (SSA) and Anti-La (SSB) antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Found in <strong>SLE</strong> and <strong>Sjögren syndrome;</strong> associated with <strong>neonatal lupus</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-ribosomal-P antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Specific for <strong>neuropsychiatric manifestations</strong> in SLE</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-histone antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Seen in <strong>drug-induced lupus;</strong> less specific for SLE</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Complements C3 and C4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low levels indicate <strong>complement consumption</strong> and disease activity</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Xenograft is:", "options": [{"label": "A", "text": "Graft across species", "correct": true}, {"label": "B", "text": "Grafts from the same species", "correct": false}, {"label": "C", "text": "Graft from the same individual", "correct": false}, {"label": "D", "text": "Graft between genetically identical individuals", "correct": false}], "correct_answer": "A. Graft across species", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:716px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Type of Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Autograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>An organ or tissue is taken from an individual and grafted on him/ herself</p>\n<p><strong>(Option C ruled out) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Isograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Grafts between genetically identical individuals, such as identical twins</p>\n<p><strong>(Option D ruled out) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Allograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Graft between two genetically non-identical members of the same species (e.g. organ transplants between two non-identical and <span class=\"customMeta\" data-dictid=\"8baf7b24c316927771847e2b2ae466\">compatible</span> individuals.<strong> (Option B ruled out) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Xenograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Graft from one species to another (e.g., pig skin is a temporary <span class=\"customMeta\" data-dictid=\"02f0c206e716927771999e45b2d63b\">substitute</span> for burn treatment). <strong> (Option A) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Synthetic Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Artificial materials or bioengineered constructs replace or support damaged tissue (e.g., artificial skin substitutes, <span class=\"customMeta\" data-dictid=\"c293dda462169277718335b755e1a9\">bone graft</span> substitutes).</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child, upon disturbing a bee hive, had several stings. After a few minutes, the child developed symptoms of shock, respiratory failure, and vascular collapse. Which of the following is the principal mediator of this reaction?", "options": [{"label": "A", "text": "Adrenaline", "correct": false}, {"label": "B", "text": "Histamine", "correct": true}, {"label": "C", "text": "Dopamine", "correct": false}, {"label": "D", "text": "Substance P", "correct": false}], "correct_answer": "B. Histamine", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/xL8gq0DZ0t3q0hqdkIGq1746082644.png"], "explanation": "<table align=\"left\" cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Early phase reaction</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Late phase reaction</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Immediate (within minutes of <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> exposure).</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Delayed (several hours after exposure) and can last for days.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cells involved</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mast cells, basophils.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Eosinophils, T lymphocytes.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cellular events</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Activation of <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells and basophils.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Recruitment and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of leukocytes, especially eosinophils.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mediators</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Histamine</strong>, leukotrienes (LTB4, LTC4, LTD4), prostaglandins (PGD2) and Platelet-activating factor (PAF).</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Cytokines (e.g., IL-4, IL-5, TNF), chemokines (e.g., eotaxin).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Initiating event</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Exposure to <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> triggers <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> of IgE on <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells/basophils.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Recurrent inflammation, sustained by recruited leukocytes.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Effect on tissues</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Vasodilation, increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability, smooth muscle contraction.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sustained <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and tissue damage due to <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> infiltration.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical manifestations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"a8dad7cd171692777197e6d4ac2a1c\">rhinitis</span> (hay fever), <span class=\"customMeta\" data-dictid=\"7e814d15c31692777201fe0d9c1a61\">urticaria</span> (hives), Angioedema bronchoconstriction.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"76891bb6e91692777182cda16e1db6\">asthma</span> exacerbation, persistent inflammation, and tissue damage.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Therapeutic Approach</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Antihistamines for <span class=\"customMeta\" data-dictid=\"509310d4411692777199f2ffdb7769\">symptomatic</span> relief.</p>\n<p>Adrenaline in anaphylactic shock.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Broad-spectrum anti-inflammatory drugs (e.g., steroids) to suppress <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and prevent tissue damage.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 78-year-old male presents with fatigue, breathlessness, and palpitations. On examination, he has pedal oedema, with a pulse rate of 55 bpm, BP of 100/70 mmHg, and oxygen saturation of 94%. ECG is normal, and echocardiography reveals restrictive cardiomyopathy. A cardiac biopsy stained with Congo red shows apple-green birefringence under polarised light. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Heart failure", "correct": false}, {"label": "B", "text": "Cardiac amyloidosis", "correct": true}, {"label": "C", "text": "Hemosiderosis", "correct": false}, {"label": "D", "text": "Dystrophic calcification", "correct": false}], "correct_answer": "B. Cardiac amyloidosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/X8ugAuoAiWWfijDq8o511746084855.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Type of Amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Amyloid Protein</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Associated Conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Primary <span class=\"customMeta\" data-dictid=\"959f3344b116927771815235718f3d\">Amyloidosis</span> (AL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Amyloid Light Chain (AL)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Plasma cell disorders (e.g., multiple myeloma)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Secondary <span class=\"customMeta\" data-dictid=\"959f3344b116927771815235718f3d\">Amyloidosis</span> (AA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Amyloid-Associated (AA)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> (e.g., <span class=\"customMeta\" data-dictid=\"40dbde72e41692777197e59d893839\">rheumatoid</span> arthritis, IBD)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Hereditary Amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Transthyretin (TTR)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Familial <span class=\"customMeta\" data-dictid=\"51ad856e041692777181f80c9d507a\">amyloid</span> polyneuropathies (e.g., <span class=\"customMeta\" data-dictid=\"5dda3cc2ab1692777202b3b3c65bea\">familial</span> Mediterranean fever)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Hemodialysis-Associated</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>β2-Microglobulin</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Long-term hemodialysis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Senile <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">Systemic</span> Amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Transthyretin (TTR)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Ageing, mutations in TTR</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Localised Amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Varies (often AL type)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Specific organs (e.g., tongue, lung, skin, bladder)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Endocrine Amyloidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (Acal)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Endocrine tumours (e.g., <span class=\"customMeta\" data-dictid=\"0a36e18386169277719259641cf29b\">medullary</span> <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinoma, pancreatic <span class=\"customMeta\" data-dictid=\"769b87740c16927771907f5a83b1f8\">islet</span> tumours)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following mediators is involved in the early phase of type 1 hypersensitivity? Mast cell Histamine Neutrophils Prostaglandins Leukotrienes", "options": [{"label": "A", "text": "1, 5", "correct": false}, {"label": "B", "text": "1, 2, 3, 4", "correct": false}, {"label": "C", "text": "1, 2, 4, 5", "correct": true}, {"label": "D", "text": "2, 3, 4", "correct": false}], "correct_answer": "C. 1, 2, 4, 5", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/p9T7KCBmiAdEZv03GG7a1745316280.png"], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mast cells</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Histamine</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Prostaglandins</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Leukotrienes</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Primary <span class=\"customMeta\" data-dictid=\"18f15a10591692777187b41e1dbead\">effector</span> cells.</p>\n<p>Activated by allergens <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> with IgE antibodies.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Released by <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells.</p>\n<p>Causes vasodilation, increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability, smooth muscle contraction, and <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> production.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>They are <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> mediators released by <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells.</p>\n<p>Contribute to vasodilation, <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability, and bronchoconstriction.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>A group of <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> mediators released by <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells.</p>\n<p>Promote bronchoconstriction, increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability, and the <span class=\"customMeta\" data-dictid=\"9bb62ce0f71692777197fcc2b5f29c\">recruitment</span> of other <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells.</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p> </p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Early phase reaction</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Late phase reaction</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Onset</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Immediate (within minutes of <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> exposure).</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Delayed (several hours after exposure) and can last for days.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Cells involved</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mast cells, basophils.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Eosinophils, T lymphocytes.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Cellular events</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Activation of <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells and basophils.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Recruitment and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of leukocytes, especially eosinophils.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mediators</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Histamine, leukotrienes (LTB4, LTC4, LTD4), prostaglandins (PGD2) and Platelet-activating factor (PAF). </p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Cytokines (e.g., IL-4, IL-5, TNF), chemokines (e.g., eotaxin)</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Initiating event</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Exposure to <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> triggers <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> of IgE on <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells/basophils.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Recurrent inflammation, sustained by recruited leukocytes.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Effect on tissues</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Vasodilation, increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability, smooth muscle contraction.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Sustained <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and tissue damage due to <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> infiltration.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Clinical manifestations</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"a8dad7cd171692777197e6d4ac2a1c\">rhinitis</span> (hay fever), <span class=\"customMeta\" data-dictid=\"7e814d15c31692777201fe0d9c1a61\">urticaria</span> (hives), Angioedema bronchoconstriction.</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"76891bb6e91692777182cda16e1db6\">asthma</span> exacerbation, persistent inflammation, and tissue damage.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Therapeutic Approach</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Antihistamines for <span class=\"customMeta\" data-dictid=\"509310d4411692777199f2ffdb7769\">symptomatic</span> relief.</p>\n<p>Adrenaline in anaphylactic shock</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Broad-spectrum anti-inflammatory drugs (e.g., steroids) to suppress <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and prevent tissue damage.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A person was brought to the emergency department with facial swelling, itching, and hypotension following a bee sting. The mentioned clinical features are due to an increase in which immunoglobulin?", "options": [{"label": "A", "text": "IgA", "correct": false}, {"label": "B", "text": "IgE", "correct": true}, {"label": "C", "text": "IgM", "correct": false}, {"label": "D", "text": "IgG", "correct": false}], "correct_answer": "B. IgE", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/WitJ8ylNJtPUzFDsZI1I1745574184.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Isotype switching is seen in:", "options": [{"label": "A", "text": "Helper T cells", "correct": false}, {"label": "B", "text": "Activated B cells", "correct": true}, {"label": "C", "text": "Cytotoxic T cells", "correct": false}, {"label": "D", "text": "B cells", "correct": false}], "correct_answer": "B. Activated B cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/0wtjCR6BLaWtzsAnYdaZ1746607047.jpg"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>IL-4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Key <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> in driving the allergic response</li>\n<li>Enhances Ig E-mediated reaction</li>\n<li>Stimulates B cells to undergo <strong>class switching to IgE</strong> and promotes the expansion of <strong>Th2 cells</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child is brought to the OPD by his parents with complaints of recurrent infections. On mediastinal imaging, the thymus gland was found to be absent. Based on further investigation, ADA levels are low. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Bruton's hypogammaglobulinemia", "correct": false}, {"label": "B", "text": "Bare lymphocyte syndrome", "correct": false}, {"label": "C", "text": "DiGeorge syndrome", "correct": false}, {"label": "D", "text": "Severe combined immunodeficiency", "correct": true}], "correct_answer": "D. Severe combined immunodeficiency", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Severe combined immu\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:529px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>XLR ( <span class=\"customMeta\" data-dictid=\"dd35346fc716927772029e2f0bb10f\">X-linked</span> <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> variety)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>AR ( Autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> variety)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Most common</li>\n<li>Defect in the <span class=\"customMeta\" data-dictid=\"49be0416121692777188dc8944b7bc\">gamma</span> subunit of <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> receptors: IL2, IL4, IL7, Il15.</li>\n<li>IL 2 and <span class=\"customMeta\" data-dictid=\"87906574d616927771895ad1e8ffcc\">IL</span> 15: <span class=\"customMeta\" data-dictid=\"144d78fe4816927771852de984c62f\">Defective</span> NK cells</li>\n<li>IL 4: No <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> production</li>\n<li>IL 7: <span class=\"customMeta\" data-dictid=\"144d78fe4816927771852de984c62f\">Defective</span> T-cell development</li>\n<li>B cells function normally.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>There are three types of AR :</p>\n<ul>\n<li>Adenosine <span class=\"customMeta\" data-dictid=\"8da63c3e5316927771852b78bac0ba\">deaminase</span> <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (most common): Involves all cells (B cells, T cells, and NK cells)</li>\n<li>JAK-3 defects: It affects <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> development. <span class=\"customMeta\" data-dictid=\"144d78fe4816927771852de984c62f\">Defective</span> T cells and NK cells. B cells function normally.</li>\n<li>RAG1 and RAG2 (Recombinant <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> gene) defect: This gene is needed to develop B cell and T cell receptors. When this gene is affected, defects in B cells and T cells are observed. NK cells function normally.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A graft from an identical twin is called:", "options": [{"label": "A", "text": "Allograft", "correct": false}, {"label": "B", "text": "Autograft", "correct": false}, {"label": "C", "text": "Isograft", "correct": true}, {"label": "D", "text": "Xenograft", "correct": false}], "correct_answer": "C. Isograft", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:716px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Type of Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Autograft (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>An organ or tissue is taken from an individual and grafted on him/ herself.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Isograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Grafts between genetically identical individuals, such as identical twins</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Allograft (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Graft between two genetically non-identical members of the same species (e.g. organ transplants between two non-identical and <span class=\"customMeta\" data-dictid=\"8baf7b24c316927771847e2b2ae466\">compatible</span> individuals.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Xenograft (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Graft from one species to another (e.g., pig skin is a temporary <span class=\"customMeta\" data-dictid=\"02f0c206e716927771999e45b2d63b\">substitute</span> for burn treatment).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Synthetic Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Artificial materials or bioengineered constructs replace or support damaged tissue (e.g., artificial skin substitutes, <span class=\"customMeta\" data-dictid=\"c293dda462169277718335b755e1a9\">bone graft</span> substitutes).</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Graft from an identical twin is called:", "options": [{"label": "A", "text": "Allograft", "correct": false}, {"label": "B", "text": "Autograft", "correct": false}, {"label": "C", "text": "Isograft", "correct": true}, {"label": "D", "text": "Xenograft", "correct": false}], "correct_answer": "C. Isograft", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:716px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Type of Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Autograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>An organ or tissue is taken from an individual and grafted on him/ herself</p>\n<p><strong>(Option B ruled out) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Isograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Grafts between genetically identical individuals, such as identical twins</p>\n<p><strong>(Option C) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Allograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Graft between two genetically non-identical members of the same species (e.g. organ transplants between two non-identical and <span class=\"customMeta\" data-dictid=\"8baf7b24c316927771847e2b2ae466\">compatible</span> individuals.<strong> (Option A ruled out) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Xenograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Graft from one species to another (e.g., pig skin is a temporary <span class=\"customMeta\" data-dictid=\"02f0c206e716927771999e45b2d63b\">substitute</span> for burn treatment). <strong> (Option D ruled out) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:none; border-top:none\">\n<p><strong>Synthetic Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:none\">\n<p>Artificial materials or bioengineered constructs replace or support damaged tissue (e.g., artificial skin substitutes, <span class=\"customMeta\" data-dictid=\"c293dda462169277718335b755e1a9\">bone graft</span> substitutes).</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A teenager developed swelling of the face, lips, and tongue and also found it difficult to breathe within a few minutes of consuming prawns. What type of hypersensitivity is seen here?", "options": [{"label": "A", "text": "Type 1", "correct": true}, {"label": "B", "text": "Type 2", "correct": false}, {"label": "C", "text": "Type 3", "correct": false}, {"label": "D", "text": "Type 4", "correct": false}], "correct_answer": "A. Type 1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:693px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Mechanism</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Immune Components</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Examples</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Type I: Immediate</strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>IgE-mediated <span class=\"customMeta\" data-dictid=\"adb3e39bbf1692777185215fad237b\">degranulation</span> of <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells and basophils after <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> binding.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>IgE antibodies</strong></li>\n<li>Mast cells</li>\n<li>Histamine</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Rapid onset (minutes)</li>\n<li>Localised or <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">systemic</span> reactions</li>\n<li>Mediated by histamine.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Anaphylaxis</li>\n<li>Allergic rhinitis</li>\n<li>Asthma</li>\n<li>Urticaria (hives)</li>\n<li>Food allergies</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Type II: Cytotoxic</strong></p>\n<p><strong>(Option B ruled out) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Antibody-mediated destruction or <span class=\"customMeta\" data-dictid=\"3662597407169277718640a12868f5\">dysfunction</span> of target cells.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>IgG</strong>, <strong>IgM antibodies</strong></li>\n<li>Complement</li>\n<li>Phagocytes</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Targets specific cells or tissues.</li>\n<li>Cell <span class=\"customMeta\" data-dictid=\"803b5ed1c8169277719190b446ac83\">lysis</span> or dysfunction.</li>\n<li>Involves <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> activation.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Autoimmune <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anemia</li>\n<li>Goodpasture syndrome</li>\n<li>Myasthenia gravis</li>\n<li>Graves' disease</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Type III: Immune Complex</strong></p>\n<p><strong>(Option C ruled out) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Deposition of immune complexes in tissues, leading to <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and damage.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>IgG</strong>, <strong>IgM Antibodies</strong></li>\n<li>Complement</li>\n<li>Neutrophils</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Immune complex deposition in vessels.</li>\n<li>Tissue <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and damage (vasculitis).</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Systemic <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">lupus</span> erythematosus (SLE)</li>\n<li>Post-streptococcal glomerulonephritis</li>\n<li>Serum sickness</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Type IV: Delayed</strong></p>\n<p><strong>(Option D ruled out) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>T-cell-mediated immune response, leading to <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and tissue damage.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>T cells (CD4+, CD8+)</strong></li>\n<li>Macrophages</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Delayed onset (48–72 hours).</li>\n<li>Involves <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> release and <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> recruitment.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Contact dermatitis</li>\n<li>Tuberculin skin test (PPD)</li>\n<li>Granulomatous <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> (e.g., tuberculosis)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which type of cells are implicated in the development of contact dermatitis in a 12-year-old boy who presented to the emergency department?", "options": [{"label": "A", "text": "Helper T cells", "correct": true}, {"label": "B", "text": "Neutrophils", "correct": false}, {"label": "C", "text": "NK cells", "correct": false}, {"label": "D", "text": "Cytotoxic T cells", "correct": false}], "correct_answer": "A. Helper T cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/kHbhkz57f3xMqHEko0px1748155053.png", "https://image.prepladder.com/content/UgAD35NJYDroRq5PlUa71748155070.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Mechanisms of Type IV hypersensitivity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Examples</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cytokine-mediated inflammation<br/>\n\t\t\t(mediated by CD4+ T cells)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>CD4+ T cells recognise protein antigens presented by APCs and <span class=\"customMeta\" data-dictid=\"c9001edbf216927771860f3475b44c\">differentiate</span> into Th1 and Th17 cells<strong>.</strong></li>\n<li>Th1 cells <span class=\"customMeta\" data-dictid=\"7b8c92219216927771981950fdd0e8\">secrete</span> cytokines like IFN-γ, activating macrophages to cause tissue damage and fibrosis.</li>\n<li>Th17 cells produce IL-17 to recruit neutrophils, promoting inflammation.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Tuberculin test (a classic example of delayed-type hypersensitivity)</li>\n<li>Granulomas</li>\n<li>Contact dermatitis</li>\n<li>Rheumatoid arthritis</li>\n<li>Multiple sclerosis</li>\n<li>IBD</li>\n<li>Psoriasis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"227\" src=\"https://image.prepladder.com/content/kHbhkz57f3xMqHEko0px1748155053.png\" width=\"541\"/></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>T <span class=\"customMeta\" data-dictid=\"5f09d353dd1692777184d29afdb259\">cell-mediated cytotoxicity</span> (mediated by CD8+ T cells)</strong></p>\n<p> </p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Cytotoxic T lymphocytes </strong>(CTLs) directly kill antigen-bearing target cells, including tumour cells, virus-infected cells, and <span class=\"customMeta\" data-dictid=\"812d0ddedb1692777181aaf62743b1\">allogeneic</span> tissue, during <span class=\"customMeta\" data-dictid=\"a283380a9a1692777188549537a964\">graft</span> rejection.</li>\n<li>CTLs use <strong>perforin-granzyme-dependent</strong> killing and <strong>Fas-Fas ligand-dependent killing</strong> mechanisms to induce <span class=\"customMeta\" data-dictid=\"4bfa3e6f2c1692777181c53b124cf7\">apoptosis</span> in target cells.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Type 1 DM</li>\n<li>Hepatic injury in HBV infection</li>\n<li>Graft vs host disease</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"214\" src=\"https://image.prepladder.com/content/UgAD35NJYDroRq5PlUa71748155070.png\" width=\"596\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 3-year-old boy presents with recurrent bacterial infections and Pneumocystis Jiroveci pneumonia. The flowcytometry analysis of the boy (Boxes 3 and 4) is shown below (Boxes 1 and 2 are normal). What is the most likely diagnosis?", "options": [{"label": "A", "text": "Bare lymphocytes", "correct": false}, {"label": "B", "text": "Chronic granulocyte deficiency", "correct": false}, {"label": "C", "text": "Hyper IgM syndrome", "correct": true}, {"label": "D", "text": "DiGeorge syndrome", "correct": false}], "correct_answer": "C. Hyper IgM syndrome", "question_images": ["https://image.prepladder.com/content/iYeKYPV2RTmXWdebt0ZK1695203124.png", "https://image.prepladder.com/content/ixTSVInuQHVTIceowkMJ1695203136.png"], "explanation_images": [], "explanation": "<p>Correct option C: <span class=\"customMeta\" data-dictid=\"8b388efd711692777189df2d1fc1e4\">Hyper</span> <span class=\"customMeta\" data-dictid=\"e4a6fd7fbb169277718986a699e800\">IgM</span&g\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Acute graft rejection occurs within:", "options": [{"label": "A", "text": "Minutes", "correct": false}, {"label": "B", "text": "Weeks to months", "correct": true}, {"label": "C", "text": "&gt; 6 weeks to 6 months", "correct": false}, {"label": "D", "text": "&gt; 6 months", "correct": false}], "correct_answer": "B. Weeks to months", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Weeks to month\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In the context of Goodpasture syndrome, which organ is affected?", "options": [{"label": "A", "text": "Liver", "correct": false}, {"label": "B", "text": "Adrenals", "correct": false}, {"label": "C", "text": "Kidney", "correct": true}, {"label": "D", "text": "Brain", "correct": false}], "correct_answer": "C. Kidney", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Acute graft rejection occurs within?", "options": [{"label": "A", "text": "Seconds to minutes", "correct": false}, {"label": "B", "text": "Days to weeks", "correct": false}, {"label": "C", "text": "Weeks to months", "correct": true}, {"label": "D", "text": "Months to years", "correct": false}], "correct_answer": "C. Weeks to months", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/vDTxvxd344wn9KgkGsPT1698301883.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with abdominal distention and intermittent fever. Peripheral smear findings are normal. A tumor is resected and the histopathology image of the resected lymph node is shown below. What is the most probable diagnosis ?", "options": [{"label": "A", "text": "Angiolymphoma", "correct": false}, {"label": "B", "text": "Hodgkin’s lymphoma", "correct": false}, {"label": "C", "text": "IgG-4 related disease", "correct": false}, {"label": "D", "text": "Castleman disease", "correct": true}], "correct_answer": "D. Castleman disease", "question_images": ["https://image.prepladder.com/content/5H8T58GwWlk1J76uNuCr1691482184.png"], "explanation_images": [], "explanation": "<p>Correct Option D\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which type of hypersensitivity reaction is a type 2 lepra reaction?", "options": [{"label": "A", "text": "Type I hypersensitivity", "correct": false}, {"label": "B", "text": "Type II hypersensitivity", "correct": false}, {"label": "C", "text": "Type III hypersensitivity", "correct": true}, {"label": "D", "text": "Type IV hypersensitivity", "correct": false}], "correct_answer": "C. Type III hypersensitivity", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Type III hypersensitiv\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following organs is a primary lymphoid organ?", "options": [{"label": "A", "text": "Lymph node", "correct": false}, {"label": "B", "text": "Spleen", "correct": false}, {"label": "C", "text": "Thymus", "correct": true}, {"label": "D", "text": "MALT", "correct": false}], "correct_answer": "C. Thymus", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2nYy0KTCGnpT3roU3x401747220937.png", "https://image.prepladder.com/content/SX0WqdIAmfe036449lmu1747377123.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Primary <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">Lymphoid</span> Organs</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Secondary <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">Lymphoid</span> Organs</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bone Marrow:</strong></p>\n<ul>\n<li>Origin of all blood cells from <span class=\"customMeta\" data-dictid=\"25a049eb321692777195ee5ad55371\">pluripotent</span> <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">hematopoietic</span> stem cells (a process called hematopoiesis).</li>\n<li>Hematopoiesis shifts to <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> from the liver after <span class=\"customMeta\" data-dictid=\"f375a3584316927772020efa386e3e\">fetal</span> life, eventually confined to <span class=\"customMeta\" data-dictid=\"01591f7f591692777182ef8aa2360c\">axial</span> bones after puberty.</li>\n<li>Progenitor T and B cells develop in bone marrow; B cells <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> here, while T cell progenitors migrate to the thymus.</li>\n</ul>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymph Nodes:</strong> <strong>(Option A ruled out)</strong></p>\n<ul>\n<li>Filter antigens and <span class=\"customMeta\" data-dictid=\"dddc752e1716927771807f985bb8bb\">activate</span> T and B cells.</li>\n<li>Structured into <span class=\"customMeta\" data-dictid=\"cab8787ce916927771852a7e72f34d\">cortex</span> (B cell area), <span class=\"customMeta\" data-dictid=\"f0cd1f6d6616927771948c9a83865f\">paracortex</span> (T cell area), and <span class=\"customMeta\" data-dictid=\"53abb386551692777192c4d1f1f5ed\">medulla</span> (rich in <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells).</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Spleen:</strong> <strong>(Option B ruled out)</strong></p>\n<ul>\n<li>Largest secondary <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> organ, involved in filtering blood-borne antigens.</li>\n<li>Contains white <span class=\"customMeta\" data-dictid=\"5b7b8d266716927771968316ee113b\">pulp</span> (T and B cells) and red <span class=\"customMeta\" data-dictid=\"5b7b8d266716927771968316ee113b\">pulp</span> (site of RBC destruction).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Thymus:</strong><strong> </strong><strong>(Option C)</strong></p>\n<ul>\n<li>Site of T cell <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and maturation.</li>\n<li>Developed from the third/fourth <span class=\"customMeta\" data-dictid=\"8ffc8a6b6416927771956d80dd7241\">pharyngeal pouch</span> in embryonic life.</li>\n<li>Active during childhood, decreases in size after puberty.</li>\n<li>Thymic hormones (e.g., thymulin, thymopoietin) help attract and <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> T cells.</li>\n<li>Central tolerance occurs here, removing self-reactive T cells to prevent autoimmunity.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mucosa-associated <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">Lymphoid</span> Tissue (MALT): </strong><strong>(Option D ruled out)</strong></p>\n<ul>\n<li>Located in mucosal sites (intestine, respiratory, <span class=\"customMeta\" data-dictid=\"2942e9d19616927772014161ee8f70\">urogenital</span> tracts) to protect against pathogens.</li>\n<li>Includes loose clusters of <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> cells and organised structures (e.g., tonsils, Peyer’s patches in intestines).</li>\n</ul>\n</td>\n</tr>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 7-year-old boy presents with a history of recurrent bacterial and fungal infections, particularly involving the skin and respiratory tract. The patient's parents report that he has had multiple abscesses and lymphadenitis. Dihydrorhodamine test results show an abnormal pattern. What is the primary suspicion based on these findings?", "options": [{"label": "A", "text": "CGD", "correct": true}, {"label": "B", "text": "SCID", "correct": false}, {"label": "C", "text": "Sialyl Lewis X", "correct": false}, {"label": "D", "text": "LAD", "correct": false}], "correct_answer": "A. CGD", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The below-given ANA pattern on immunofluorescence (IF) is seen; identify the pattern.", "options": [{"label": "A", "text": "Nucleolar", "correct": false}, {"label": "B", "text": "Speckled", "correct": false}, {"label": "C", "text": "Centromeric", "correct": true}, {"label": "D", "text": "Diffuse", "correct": false}], "correct_answer": "C. Centromeric", "question_images": ["https://image.prepladder.com/content/UEHpy7a2ivrgrlqo1v991746007468.png"], "explanation_images": ["https://image.prepladder.com/content/Gc2pExVChrSWQ3gHWCW61746007541.png", "https://image.prepladder.com/content/fIm85U5ZhM5MXlTWg6sR1746007541.png", "https://image.prepladder.com/content/Es5dNQqs9SCTQ5KXYF3y1746007541.png", "https://image.prepladder.com/content/bJhwoKLHzmk7fvNw9gQI1746007541.png", "https://image.prepladder.com/content/GXbDl4sDY9bGzsWSTa9j1746007592.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Homogeneous or <span class=\"customMeta\" data-dictid=\"89275101301692777186567d1912a0\">diffuse</span> <span class=\"customMeta\" data-dictid=\"3b007026bd16927771997ae809b603\">staining</span> of <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> </strong></p>\n<p><strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<ul>\n<li>Antibodies <span class=\"customMeta\" data-dictid=\"092583d1b41692777197a506409267\">reactive</span> with dsDNA, nucleosomes, and histones,</li>\n<li>This is seen in <strong>SLE, </strong>\n<ul>\n<li><strong>Drug-induced lupus</strong></li>\n<li><strong>Mixed <span class=\"customMeta\" data-dictid=\"67e237a57c16927771859803f93ab3\">connective</span> tissue disorder</strong></li>\n</ul>\n</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Simon Caulton \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Antinuclear_antibody#/media/File:DsDNA_antibodies.jpg\" data-tags=\"\" height=\"251\" src=\"https://image.prepladder.com/content/Gc2pExVChrSWQ3gHWCW61746007541.png\" width=\"291\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Speckled pattern</strong></p>\n<p><strong>(Option B ruled out)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Antibodies against various nuclear antigens, including Sm and RNPs</li>\n<li>It is seen in SLE\n\t\t\t\t<ul>\n<li><strong>Scleroderma</strong></li>\n<li><strong>Sjogren’s syndrome</strong></li>\n</ul>\n</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Michael Mahler, Marvin J. Fritzler\" data-hash=\"\" data-license=\"CC BY\" data-source=\"https://onlinelibrary.wiley.com/doi/10.1155/2012/494356\" data-tags=\"\" height=\"218\" src=\"https://image.prepladder.com/content/fIm85U5ZhM5MXlTWg6sR1746007541.png\" width=\"292\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Nucleolar pattern</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Antibodies against nucleolar proteins.</li>\n<li>It is seen in<strong> Scleroderma and Polymyositis.</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Simon Caulton \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:ANA_NUCLEOLAR_3.jpg\" data-tags=\"\" height=\"283\" src=\"https://image.prepladder.com/content/Es5dNQqs9SCTQ5KXYF3y1746007541.png\" width=\"291\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-centromere antibodies </strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Systemic sclerosis, Sjögren syndrome, and other diseases</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Simon Caulton \" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Anti-centromere_antibodies#/media/File:CENTROMERE.jpg\" data-tags=\"\" height=\"243\" src=\"https://image.prepladder.com/content/bJhwoKLHzmk7fvNw9gQI1746007541.png\" width=\"290\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Al-Mughales JA. Minor edits by Mikael Häggström, M.D.\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://en.wikipedia.org/wiki/Antinuclear_antibody#/media/File:Main_antinuclear_antibody_patterns_on_immunofluorescence.png\" data-tags=\"\" height=\"335\" src=\"https://image.prepladder.com/content/GXbDl4sDY9bGzsWSTa9j1746007592.png\" width=\"425\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following antibodies is specific for scleroderma?", "options": [{"label": "A", "text": "Anti-centromere antibody", "correct": true}, {"label": "B", "text": "Anti-La antibody", "correct": false}, {"label": "C", "text": "Anti-Jo-1 antibody", "correct": false}, {"label": "D", "text": "Anti-U1 RNP antibodies", "correct": false}], "correct_answer": "A. Anti-centromere antibody", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:642px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Diffuse & Limited <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">Systemic</span> Sclerosis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Diffuse </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Limited</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Skin involvement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Proximal & <span class=\"customMeta\" data-dictid=\"5ff25303a01692777186731f6a4f5c\">Distal</span> extremities, face, trunk</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Distal to elbows, face</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Raynaud’s Phenomenon</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Onset <1 year/at the time of skin changes</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Precede skin diseases by years</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Organ Involvement</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Pulmonary (Interstitial fibrosis),</p>\n<p>Renal (Renovascular <span class=\"customMeta\" data-dictid=\"dd2daa0c6216927771893c9cab82d9\">hypertensive</span> crisis),</p>\n<p>GI & Cardiac</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>GI, <span class=\"customMeta\" data-dictid=\"7dd6eda7ce169277718325f22de9e8\">Biliary</span> cirrhosis, <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">Pulmonary</span> <span class=\"customMeta\" data-dictid=\"a66cd3adaa1692777182e77cb23021\">artery</span> hypertension</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Nail fold capillaries</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dilatation and dropout</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dilatation without significant dropout</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Antinuclear antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Anti-topoisomerase 1</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Anticentromere</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Antibodies </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-La <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sjogren’s syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-Jo-1 <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> (Option C) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dermatomyositis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-U1 <span class=\"customMeta\" data-dictid=\"4e20fdb462169277719733f536a9a9\">RNP</span> antibodies (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Mixed <span class=\"customMeta\" data-dictid=\"67e237a57c16927771859803f93ab3\">connective</span> tissue disease (MCTD)</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:602px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Antibodies </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-topoisomerase 1 antibody</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Diffuse <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">Systemic</span> Sclerosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anticentromere antibody</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Limited <span class=\"customMeta\" data-dictid=\"8f2e7fd96116927771995b451b5c90\">Systemic</span> Sclerosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-La <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sjogren’s syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-Jo-1 <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dermatomyositis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Anti-U1 <span class=\"customMeta\" data-dictid=\"4e20fdb462169277719733f536a9a9\">RNP</span> antibodies </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Mixed <span class=\"customMeta\" data-dictid=\"67e237a57c16927771859803f93ab3\">connective</span> tissue disease (MCTD)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following genes is responsible for the regulation of T lymphocytes by the thymus?", "options": [{"label": "A", "text": "AIRE", "correct": true}, {"label": "B", "text": "Notch 1", "correct": false}, {"label": "C", "text": "E2A", "correct": false}, {"label": "D", "text": "Rag1/2", "correct": false}], "correct_answer": "A. AIRE", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What does CD40 deficiency in a person signify?", "options": [{"label": "A", "text": "B cell absent", "correct": true}, {"label": "B", "text": "T cell absent", "correct": false}, {"label": "C", "text": "IgM increase", "correct": false}, {"label": "D", "text": "IgG increase", "correct": false}], "correct_answer": "A. B cell absent", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "After class switching, a particular class of antibody is produced, but IgM and IgD are expressed concomitantly on the surface of a B cell due to which of the following phenomena?", "options": [{"label": "A", "text": "Allelic exclusion", "correct": false}, {"label": "B", "text": "Alternate RNA splicing", "correct": true}, {"label": "C", "text": "Somatic hypermutation", "correct": false}, {"label": "D", "text": "Affinity maturation", "correct": false}], "correct_answer": "B. Alternate RNA splicing", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What method is employed for the detection of autoantibodies?", "options": [{"label": "A", "text": "Direct Immunofluorescence", "correct": false}, {"label": "B", "text": "ELISA", "correct": false}, {"label": "C", "text": "Indirect Immunofluorescence", "correct": true}, {"label": "D", "text": "FISH", "correct": false}], "correct_answer": "C. Indirect Immunofluorescence", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/JuggNOPPQQfrlQGImDcR1745925998.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:595px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Limitation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Direct Immunofluorescence</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Detects <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> directly using a fluorescent-labelled antibody.</p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Requires separate <span class=\"customMeta\" data-dictid=\"df068e6efc16927772029693b5023e\">fluorescent</span> conjugates for each antigen.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Indirect Immunofluorescence</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>It uses <span class=\"customMeta\" data-dictid=\"18665cc70b1692777181f6f3baa32c\">antiglobulin</span> <span class=\"customMeta\" data-dictid=\"df068e6efc16927772029693b5023e\">fluorescent</span> <span class=\"customMeta\" data-dictid=\"2421c657771692777185af1b7b59c3\">conjugate</span> to detect human antibodies, enhancing versatility.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Allows the use of a single anti-human conjugate.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"2686\" src=\"https://image.prepladder.com/content/JuggNOPPQQfrlQGImDcR1745925998.png\" width=\"4167\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A young person with recurrent seasonal conjunctivitis presents with itchiness and eye-watering. What is the most likely cell involved in the immediate phase of this condition?", "options": [{"label": "A", "text": "Eosinophils", "correct": false}, {"label": "B", "text": "Mast cells", "correct": true}, {"label": "C", "text": "Neutrophils", "correct": false}, {"label": "D", "text": "Lymphocytes", "correct": false}], "correct_answer": "B. Mast cells", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Type I <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> reaction phases and its features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Phase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Timing</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Mechanism</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immediate Phase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seconds to minutes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mast cell/basophil degranulation</strong>: <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> leads to the release of <span class=\"customMeta\" data-dictid=\"b5d4ddbfe71692777189a12acd5502\">histamine</span> and other mediators.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Late Phase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4-12 hours, peaks at 24-48 hours, lasting up to days</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inflammatory cell recruitment</strong>: Cytokines/chemokines attract eosinophils, neutrophils, and macrophages, causing sustained inflammation. <strong>(Options A & C ruled out)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is implicated in the pathogenesis of rheumatoid arthritis?", "options": [{"label": "A", "text": "IgE-mediated", "correct": false}, {"label": "B", "text": "Defective cellular and humoral immunity", "correct": false}, {"label": "C", "text": "Autoimmunity", "correct": true}, {"label": "D", "text": "Chronic microbial infections", "correct": false}], "correct_answer": "C. Autoimmunity", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/hiUq2EMKgSUclJoBclEu1746428487.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Rheumatoid <span class=\"customMeta\" data-dictid=\"6f74c7bfe0169277718240005b59d1\">arthritis</span> </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Epidemiology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Male to female ratio - 1:3.</li>\n<li>Peaks between 25 and 55 years.</li>\n<li>Remains constant between 55 and 75.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Genetics </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Strongly associated with the <strong>HLA-DRβ1 gene.</strong></li>\n<li>Higher <span class=\"customMeta\" data-dictid=\"a5379e182d1692777184224652dcb1\">concordance</span> in <span class=\"customMeta\" data-dictid=\"e7afab7b981692777192aca13178fa\">monozygotic</span> twins.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Triggers and suppressors </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cigarette smoking and infections can trigger RA in genetically predisposed individuals by <span class=\"customMeta\" data-dictid=\"4881d0c99216927771849df336b09a\">citrullination</span> of proteins.</li>\n<li>RA may remit during pregnancy and can first appear <span class=\"customMeta\" data-dictid=\"3d885759d516927771966b84bfa470\">postpartum</span> due to <span class=\"customMeta\" data-dictid=\"55241e8b7916927771896c864d30ea\">immune suppression</span> and hormonal changes.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"617\" src=\"https://image.prepladder.com/content/hiUq2EMKgSUclJoBclEu1746428487.png\" width=\"819\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presented to the OPD with hepatosplenomegaly, and his bone marrow showed 22% of plasma cells. Biopsy reveals pinkish acellular material deposition. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Myxoid degeneration of the bone marrow", "correct": false}, {"label": "B", "text": "Amyloidosis", "correct": true}, {"label": "C", "text": "Plasma cell leukemia", "correct": false}, {"label": "D", "text": "Hemolytic anemia", "correct": false}], "correct_answer": "B. Amyloidosis", "question_images": ["https://image.prepladder.com/content/a0u9AFSmQTVQ6ofgsnfW1724851643.png"], "explanation_images": ["https://image.prepladder.com/content/fFpXRMfDEutvwEr1IrAb1724852174.png"], "explanation": "<p>Correct Option B – A\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A person was brought to the emergency department with facial swelling, itching, and hypotension following a bee sting. The mentioned clinical features are due to the increase in which of the following immunoglobulins?", "options": [{"label": "A", "text": "IgA", "correct": false}, {"label": "B", "text": "IgE", "correct": true}, {"label": "C", "text": "IgM", "correct": false}, {"label": "D", "text": "IgG", "correct": false}], "correct_answer": "B. IgE", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/cDxAnUpYqIaRtUs8yCNh1747907531.png"], "explanation": "<table align=\"left\" cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Early phase reaction</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Late phase reaction</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Immediate (within minutes of <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> exposure).</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Delayed (several hours after exposure) and can last for days.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cells involved</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mast cells, basophils.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Eosinophils, T lymphocytes.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cellular events</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Activation of <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells and basophils.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Recruitment and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of leukocytes, especially eosinophils.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mediators</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Histamine</strong>, leukotrienes (LTB4, LTC4, LTD4), prostaglandins (PGD2) and Platelet-activating factor (PAF).</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Cytokines (e.g., IL-4, IL-5, TNF), chemokines (e.g., eotaxin).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Initiating event</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Exposure to <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> triggers <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> of IgE on <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells/basophils.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Recurrent inflammation, sustained by recruited leukocytes.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Effect on tissues</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Vasodilation, increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability, smooth muscle contraction.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sustained <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and tissue damage due to <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> infiltration.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical manifestations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"a8dad7cd171692777197e6d4ac2a1c\">rhinitis</span> (hay fever), <span class=\"customMeta\" data-dictid=\"7e814d15c31692777201fe0d9c1a61\">urticaria</span> (hives), Angioedema bronchoconstriction.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"76891bb6e91692777182cda16e1db6\">asthma</span> exacerbation, persistent inflammation, and tissue damage.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Therapeutic Approach</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Antihistamines for <span class=\"customMeta\" data-dictid=\"509310d4411692777199f2ffdb7769\">symptomatic</span> relief.</p>\n<p>Adrenaline in anaphylactic shock.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Broad-spectrum anti-inflammatory drugs (e.g., steroids) to suppress <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and prevent tissue damage.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a marker of natural killer cells?", "options": [{"label": "A", "text": "CD68", "correct": false}, {"label": "B", "text": "CD3", "correct": false}, {"label": "C", "text": "CD25", "correct": false}, {"label": "D", "text": "CD94", "correct": true}], "correct_answer": "D. CD94", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/6o8gdmt22HRs0scFdnJB1745394014.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A boy presents with recurrent episodes of melena. On examination, there is eczema of the skin with multiple petechiae. His platelet count is low, with normal RBC and WBC counts. Which of the following is the diagnostic investigation for this patient?", "options": [{"label": "A", "text": "WASP gene mutation", "correct": true}, {"label": "B", "text": "Anti-platelet antibodies", "correct": false}, {"label": "C", "text": "Bone marrow biopsy", "correct": false}, {"label": "D", "text": "Electron microscopy", "correct": false}], "correct_answer": "A. WASP gene mutation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In a patient with Bare Lymphocyte Syndrome, graft-versus-host disease (GVHD) does not occur. Which of the following causes it?", "options": [{"label": "A", "text": "Complement deficiency", "correct": false}, {"label": "B", "text": "Deficiency of CD4 T lymphocytes", "correct": false}, {"label": "C", "text": "MHC Class II deficiency in lymphocytes", "correct": true}, {"label": "D", "text": "MHC Class I deficiency in lymphocytes", "correct": false}], "correct_answer": "C. MHC Class II deficiency in lymphocytes", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a part of innate immunity?", "options": [{"label": "A", "text": "Alpha defensins", "correct": false}, {"label": "B", "text": "B lymphocytes", "correct": true}, {"label": "C", "text": "Gamma delta T lymphocytes", "correct": false}, {"label": "D", "text": "Lectin pathway", "correct": false}], "correct_answer": "B. B lymphocytes", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Difference between <span class=\"customMeta\" data-dictid=\"cc8345eacd1692777190c2e063a170\">innate</span> and <span class=\"customMeta\" data-dictid=\"0f0b2969921692777180de24f0b0c0\">acquired</span> immunity</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Innate/native immunity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acquired/adaptive immunity</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present since birth.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs after exposure to the pathogen.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Quick, non-specific response.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Slower, specific response to a pathogen.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No <span class=\"customMeta\" data-dictid=\"6eec2212b91692777189b54f3d9066\">immunological</span> memory.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Has <span class=\"customMeta\" data-dictid=\"6eec2212b91692777189b54f3d9066\">immunological</span> memory.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Examples include:</strong></p>\n<ul>\n<li>Epithelial barriers like skin, GIT.</li>\n<li>Plasma proteins like C-reactive protein.</li>\n<li>Neutrophils, macrophages, <span class=\"customMeta\" data-dictid=\"77f797c5e8169277718535480fa7fd\">dendritic</span> cells, <strong>complement system.</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells are of 2 types:</strong></p>\n<ul>\n<li><strong>B lymphocytes</strong>: Provides <span class=\"customMeta\" data-dictid=\"1a6d065f851692777189ba5533d1ef\">humoral</span> <span class=\"customMeta\" data-dictid=\"4f9ee631c21692777189b1e0cdc91c\">immunity</span> and produces antibodies.</li>\n<li><strong>T lymphocytes:</strong> Involved in <span class=\"customMeta\" data-dictid=\"5eb50cf561169277718491671207db\">cell-mediated immunity</span> and help with <span class=\"customMeta\" data-dictid=\"4f9ee631c21692777189b1e0cdc91c\">immunity</span> against <span class=\"customMeta\" data-dictid=\"a621be29da16927771901bc91014d1\">intracellular</span> microbes.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following cytokines is not involved in the Th1 response?", "options": [{"label": "A", "text": "IFN gamma", "correct": false}, {"label": "B", "text": "IL-2", "correct": false}, {"label": "C", "text": "IL-12", "correct": false}, {"label": "D", "text": "IL-4", "correct": true}], "correct_answer": "D. IL-4", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/JtB5PltqtmFl7Sllr44P1746696609.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:900px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Subtype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Function and Characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Key Cytokines</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TH1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Involved in chronic <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> diseases.</li>\n<li>Activated by <strong>IL-12 </strong><strong>(Option C)</strong> from APCs.</li>\n<li>Secrete IFN-gamma, activating macrophages.</li>\n<li>Stimulates macrophages to <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> <span class=\"customMeta\" data-dictid=\"ed5f81953d1692777187529a6de318\">epithelioid</span> cells and giant cells.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IFN-gamma </strong></p>\n<p><strong>(Option A)</strong></p>\n<p><strong>IL-2</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TH2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Responsible for the alternative <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> of <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> activation.</li>\n<li>Release cytokines<strong> IL-4</strong>, IL-5, and IL-13.</li>\n<li>To expel parasites from the body, stimulate <span class=\"customMeta\" data-dictid=\"7eba65a7251692777187eaa3b48258\">eosinophil</span> activation, <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> production (especially IgE), and <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> production.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IL-4</strong>, IL-5, IL-13</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TH17</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Defend against <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> bacteria and fungi.</li>\n<li>Secrete IL-17 and IL-22, attracting neutrophils and monocytes.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-17, IL-22</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treg </strong></p>\n<p><strong>(T regulatory)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It suppresses <span class=\"customMeta\" data-dictid=\"dc6add5cf91692777189b30a6bae38\">immune response</span> and maintains <span class=\"customMeta\" data-dictid=\"50796581771692777189251fbe5ef1\">homeostasis</span> and self-tolerance.</li>\n<li>Inhibit T cell <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> production, preventing <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> reaction.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-10, TGF-beta</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tfh (Follicular T helper)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Assist B cells in rapid <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> production.</li>\n<li>Help produce antibodies with greater affinity.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-21</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Immune privilege site is:", "options": [{"label": "A", "text": "Liver", "correct": false}, {"label": "B", "text": "Seminiferous tubule", "correct": true}, {"label": "C", "text": "Heart", "correct": false}, {"label": "D", "text": "Spinal cord", "correct": false}], "correct_answer": "B. Seminiferous tubule", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"1406286c02169277719897928fb9f1\">Seminiferous</span> tubu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Gamma delta T cell (yδ) receptors recognize:", "options": [{"label": "A", "text": "Lipids without MHC proteins", "correct": true}, {"label": "B", "text": "Peptides with MHC proteins", "correct": false}, {"label": "C", "text": "CD20", "correct": false}, {"label": "D", "text": "CD3", "correct": false}], "correct_answer": "A. Lipids without MHC proteins", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Lipids without <span class=\"customMeta\" data-dictid=\"99ed7c494c1692777192b0995e73f4\">MHC</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Toluidine blue staining is used in the identification of which of the following cells?", "options": [{"label": "A", "text": "Lymphocyte", "correct": false}, {"label": "B", "text": "Fibroblast", "correct": false}, {"label": "C", "text": "Macrophage", "correct": false}, {"label": "D", "text": "Mast cell", "correct": true}], "correct_answer": "D. Mast cell", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - M\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Antibody-dependent cellular cytotoxicity (ADCC) is seen with :", "options": [{"label": "A", "text": "NK cells only", "correct": false}, {"label": "B", "text": "Macrophages only", "correct": false}, {"label": "C", "text": "NK cells, neutrophils, and eosinophils", "correct": true}, {"label": "D", "text": "Neutrophils and eosinophils only", "correct": false}], "correct_answer": "C. NK cells, neutrophils, and eosinophils", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - NK cells, Neutrophils, and Eosinoph\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is true regarding amyloidosis?", "options": [{"label": "A", "text": "SAA forms amyloid in multiple myeloma", "correct": false}, {"label": "B", "text": "On Congo red staining, amyloid shows apple green birefringence", "correct": true}, {"label": "C", "text": "In AL type amyloid is most commonly formed from kappa chain", "correct": false}, {"label": "D", "text": "β2 - macroglobulin forms amyloid in systemic senile amyloidosis", "correct": false}], "correct_answer": "B. On Congo red staining, amyloid shows apple green birefringence", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - On <span class=\"customMeta\" data-dictid=\"a97f1abe2b1692777185a049d20f07\">Congo red</span> staining, <span class=\"customMeta\" data-dictid=\"51ad856e041692777181f80c9d507a\">amyloid</span> shows apple green birefring\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a type-2 hypersensitivity reaction?", "options": [{"label": "A", "text": "Chronic kidney rejection", "correct": false}, {"label": "B", "text": "Autoimmune hemolytic anaemia", "correct": true}, {"label": "C", "text": "Arthus reaction", "correct": false}, {"label": "D", "text": "Mantoux test", "correct": false}], "correct_answer": "B. Autoimmune hemolytic anaemia", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">Autoimmune</span> <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Xenograft is:", "options": [{"label": "A", "text": "Graft across species", "correct": true}, {"label": "B", "text": "Graft from same species", "correct": false}, {"label": "C", "text": "Graft from same individual", "correct": false}, {"label": "D", "text": "Graft from same organ", "correct": false}], "correct_answer": "A. Graft across species", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"a283380a9a1692777188549537a964\">Graft</span> across species:</p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Graft types</strong></td>\n<td style=\"text-align:center\"><strong>Description</strong></td>\n<td style=\"text-align:center\"><strong>Examples</strong></td>\n</tr>\n<tr>\n<td>Autograft</td>\n<td>Transfer of tissue from one site to another in the same individual</td>\n<td>Skin grafts from one site to another on the same individual</td>\n</tr>\n<tr>\n<td>Allograft</td>\n<td>Transfer of tissue between genetically non-identical individuals of the same species</td>\n<td>Kidney transplant from a living or deceased donor</td>\n</tr>\n<tr>\n<td>Isograft</td>\n<td>Transfer of tissue between genetically identical individuals (e.g., identical twins)</td>\n<td>Organ transplant between <span class=\"customMeta\" data-dictid=\"e7afab7b981692777192aca13178fa\">monozygotic</span> twins</td>\n</tr>\n<tr>\n<td>Xenograft</td>\n<td>Transfer of tissue between different species</td>\n<td>Pig <span class=\"customMeta\" data-dictid=\"efba33a3fd1692777189906f884236\">heart valve</span> transplant in a human</td>\n</tr>\n</tbody>\n\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td><strong>Graft types</strong></td>\n<td><strong>Description</strong></td>\n<td><strong>Examples</strong></td>\n</tr>\n<tr>\n<td>Autograft</td>\n<td>Transfer of tissue from one site to another in the same individual</td>\n<td>Skin grafts from one site to another on the same individual</td>\n</tr>\n<tr>\n<td>Allograft</td>\n<td>Transfer of tissue between genetically non-identical individuals of the same species</td>\n<td>Kidney transplant from a living or deceased donor</td>\n</tr>\n<tr>\n<td>Isograft</td>\n<td>Transfer of tissue between genetically identical individuals (e.g., identical twins)</td>\n<td>Organ transplant between <span class=\"customMeta\" data-dictid=\"e7afab7b981692777192aca13178fa\">monozygotic</span> twins</td>\n</tr>\n<tr>\n<td>Xenograft</td>\n<td>Transfer of tissue between different species</td>\n<td>Pig <span class=\"customMeta\" data-dictid=\"efba33a3fd1692777189906f884236\">heart valve</span> transplant in a human</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the single most important long-term limitation of cardiac transplantation?", "options": [{"label": "A", "text": "Allograft rejection", "correct": false}, {"label": "B", "text": "Allograft arteriopathy", "correct": true}, {"label": "C", "text": "Infection", "correct": false}, {"label": "D", "text": "Malignancy", "correct": false}], "correct_answer": "B. Allograft arteriopathy", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"44d3120c8f16927771815478ab1d1f\">Allograft</span> Arteriopath\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 12-year-old boy presents to the clinic complaining of severe abdominal pain and headaches for the past two days. He has a history of myalgia and several episodes of vomiting . His parents self-medicated with paracetamol, but the patient had no relief. A dengue NS-1 antigen test was ordered, which came out positive . What is the first line of defence for the body in the given scenario?", "options": [{"label": "A", "text": "Natural Killer cells", "correct": true}, {"label": "B", "text": "T cell", "correct": false}, {"label": "C", "text": "Histiocyte", "correct": false}, {"label": "D", "text": "Macrophage", "correct": false}], "correct_answer": "A. Natural Killer cells", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Natural K\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Type II Hypersensitivity is seen in:", "options": [{"label": "A", "text": "Pernicious anaemia", "correct": true}, {"label": "B", "text": "Serum sickness", "correct": false}, {"label": "C", "text": "Arthus phenomenon", "correct": false}, {"label": "D", "text": "Pathergy phenomenon", "correct": false}], "correct_answer": "A. Pernicious anaemia", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"5cc1ea37091692777195fbd0aa687b\">Pernicious</span> A\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which gene is not involved in SCID?", "options": [{"label": "A", "text": "BTK", "correct": true}, {"label": "B", "text": "JAK-3", "correct": false}, {"label": "C", "text": "RAG1", "correct": false}, {"label": "D", "text": "IL-7Rα", "correct": false}], "correct_answer": "A. BTK", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - BTK\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Basophils are activated by?", "options": [{"label": "A", "text": "IL-5", "correct": true}, {"label": "B", "text": "INF-gamma", "correct": false}, {"label": "C", "text": "TNF-alpha", "correct": false}, {"label": "D", "text": "IL-2", "correct": false}], "correct_answer": "A. IL-5", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - IL-5\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Interleukin</strong></td>\n<td style=\"text-align:center\"><strong>Function</strong></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">IL-1</td>\n<td>\n<ul>\n<li>Pro-inflammatory cytokine</li>\n<li>Stimulates the production of acute-phase proteins</li>\n<li>Activates T cells and macrophages</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">IL-2</td>\n<td>\n<ul>\n<li>Stimulates the growth and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of T cells</li>\n<li>Enhances cytotoxic T cell and NK cell activity</li>\n<li>Supports B cell differentiation</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">IL-4</td>\n<td>\n<ul>\n<li>Stimulates Th2 cell differentiation</li>\n<li>Promotes B cell <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> and <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> production</li>\n<li>Enhances class switching to IgE</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">IL-6</td>\n<td>\n<ul>\n<li>Promotes <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and acute-phase response</li>\n<li>Stimulates the production of acute-phase proteins</li>\n<li>Induces B cell differentiation</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">IL-10</td>\n<td>\n<ul>\n<li>Anti-inflammatory cytokine</li>\n<li>Suppresses the <span class=\"customMeta\" data-dictid=\"dc6add5cf91692777189b30a6bae38\">immune response</span> and inflammation</li>\n<li>Inhibits antigen-presenting cell function</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">IL-12</td>\n<td>\n<ul>\n<li>Promotes Th1 cell differentiation</li>\n<li>Activates NK cells and cytotoxic T cells</li>\n<li>Enhances IFN-γ production</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">IL-17</td>\n<td>\n<ul>\n<li>Promotes <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and <span class=\"customMeta\" data-dictid=\"000d23188716927771936c5f2fe74e\">neutrophil</span> recruitment</li>\n<li>Involved in host defense against <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> pathogens</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following about γ δ T-cells is incorrect?", "options": [{"label": "A", "text": "Kills extracellular bacteria by granulysin and perforin", "correct": false}, {"label": "B", "text": "Need antigen processing and presentation for its recognition", "correct": true}, {"label": "C", "text": "Direct killing of infected macrophages", "correct": false}, {"label": "D", "text": "Provide protection against mycobacteria", "correct": false}], "correct_answer": "B. Need antigen processing and presentation for its recognition", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "True about anaphylactoid reactions are all except :", "options": [{"label": "A", "text": "Involves degranulation of mast cells", "correct": false}, {"label": "B", "text": "IgE-mediated", "correct": true}, {"label": "C", "text": "Can occur on first exposure", "correct": false}, {"label": "D", "text": "Can be caused by NSAIDs", "correct": false}], "correct_answer": "B. IgE-mediated", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - IgE\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following cells is responsible for graft rejection?", "options": [{"label": "A", "text": "Macrophages", "correct": false}, {"label": "B", "text": "T cells", "correct": true}, {"label": "C", "text": "B cells", "correct": false}, {"label": "D", "text": "Plasma cells", "correct": false}], "correct_answer": "B. T cells", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - T\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The X-ray of a middle-aged man showed multiple lytic lesions , following which a urine examination was done . The sample revealed Bence Jones proteins. Which is the most common immunoglobulin associated with this condition ?", "options": [{"label": "A", "text": "IgA", "correct": false}, {"label": "B", "text": "IgD", "correct": false}, {"label": "C", "text": "IgG", "correct": true}, {"label": "D", "text": "IgM", "correct": false}], "correct_answer": "C. IgG", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - IgG\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 64 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 20-year-old girl was diagnosed with acute lymphoblastic leukaemia (ALL). Her medical team has determined that a bone marrow transplant is necessary to achieve remission and prevent disease recurrence. She has an identical twin sister, who is an eligible donor. What type of grafting was done on this patient?", "options": [{"label": "A", "text": "Allograft", "correct": false}, {"label": "B", "text": "Autograft", "correct": false}, {"label": "C", "text": "Isograft", "correct": true}, {"label": "D", "text": "Xenograft", "correct": false}], "correct_answer": "C. Isograft", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:716px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Type of Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Autograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>An organ or tissue is taken from an individual and grafted on him/ herself</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Isograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Grafts between genetically identical individuals, such as identical twins</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Allograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Graft between two genetically non-identical members of the same species (e.g. organ transplants between two non-identical and <span class=\"customMeta\" data-dictid=\"8baf7b24c316927771847e2b2ae466\">compatible</span> individuals.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Xenograft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Graft from one species to another (e.g., pig skin is a temporary <span class=\"customMeta\" data-dictid=\"02f0c206e716927771999e45b2d63b\">substitute</span> for burn treatment).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Synthetic Graft</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Artificial materials or bioengineered constructs replace or support damaged tissue (e.g., artificial skin substitutes, <span class=\"customMeta\" data-dictid=\"c293dda462169277718335b755e1a9\">bone graft</span> substitutes).</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the minimum HLA matching that should be achieved to proceed with the transplant in the pediatric population?", "options": [{"label": "A", "text": "4/6", "correct": true}, {"label": "B", "text": "6/6", "correct": false}, {"label": "C", "text": "6/8", "correct": false}, {"label": "D", "text": "8/10", "correct": false}], "correct_answer": "A. 4/6", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>If these <span class=\"customMeta\" data-dictid=\"b1debe2a7c16927771890479332d98\">HLA</span> Antigens and Alleles Match</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Then, the donor is considered to be this type of match:</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A, B and DRB1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>6/6</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A, B, C, and DRB1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>8/8</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A, B, C, DRB1 and DQB1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>10/10</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A, B, C, DRB1, DQB1 and DPB1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>12/12</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old woman with end-stage renal disease recently received a compatible donor organ from her brother. The kidney transplant surgery proceeds as planned, but within minutes of reperfusion, the kidney becomes mottled, cyanotic and anuric. What is the cause for this presentation?", "options": [{"label": "A", "text": "Preformed antibodies in the donor", "correct": false}, {"label": "B", "text": "Preformed antibodies in the recipient", "correct": true}, {"label": "C", "text": "Cytotoxic T-lymphocyte-mediated injury", "correct": false}, {"label": "D", "text": "CD4+ cells mediated inflammation", "correct": false}], "correct_answer": "B. Preformed antibodies in the recipient", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/j71FtLJyyp1iEg2RcIm21737003122.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old man, two months post-kidney transplant, presents with sudden oliguria, fever, and graft site swelling. Biopsy shows glomerular and peritubular capillary inflammation with complement deposition. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute humoral rejection", "correct": true}, {"label": "B", "text": "Acute calcineurin inhibitor nephrotoxicity", "correct": false}, {"label": "C", "text": "Acute cellular rejection", "correct": false}, {"label": "D", "text": "BK virus infection", "correct": false}], "correct_answer": "A. Acute humoral rejection", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute <span class=\"customMeta\" data-dictid=\"1a6d065f851692777189ba5533d1ef\">humoral</span> rejection</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> rejection</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Acute <span class=\"customMeta\" data-dictid=\"1a6d065f851692777189ba5533d1ef\">humoral</span> <span class=\"customMeta\" data-dictid=\"49e378f9f71692777197bc5e458569\">rejection</span> mediated by newly synthesized antibodies.</li>\n<li>It causes endothelial damage and <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> activation.</li>\n<li><strong>Type II or IV hypersensitivity.</strong></li>\n<li>No response to increasing doses of <span class=\"customMeta\" data-dictid=\"c3c986cd721692777189b473814b2e\">immunosuppressive</span> drugs.</li>\n<li><strong>Treatment:</strong> B cell depleting agents.</li>\n<li><strong>Microscopic appearance:</strong>\n<ul>\n<li>Fibrinoid <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> in vessels.</li>\n<li>Deposition of C4d in <span class=\"customMeta\" data-dictid=\"ce12dc160c1692777195473ab2cc21\">peritubular</span> capillaries. (Complement <span class=\"customMeta\" data-dictid=\"903370f259169277718385f6060dd7\">breakdown</span> product).</li>\n</ul>\n</li>\n<li><strong>C4d is the marker for <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"1a6d065f851692777189ba5533d1ef\">humoral</span> rejection.</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mediated by CD4+ or CD8+ T cells.</li>\n<li><strong>Type IV <span class=\"customMeta\" data-dictid=\"2c7e1ce33316927771892ce1da8276\">hypersensitivity</span> reaction.</strong></li>\n<li>Responsive to increasing doses of <span class=\"customMeta\" data-dictid=\"c3c986cd721692777189b473814b2e\">immunosuppressive</span> drugs.</li>\n<li><strong>Microscopic appearance:</strong>\n<ul>\n<li>Tubulointerstitial pattern:</li>\n<li>Tubulitis :</li>\n<li>Destruction of tubules + <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells in tubules.</li>\n<li>mononuclear <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> infiltrate.</li>\n<li>vascular pattern:</li>\n<li>Endothelitis</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male patient presents with a widespread rash, severe diarrhoea, and jaundice. He underwent bonemarrow transplantation for acute myeloid leukaemia and received cells from a matched, unrelated donor. Which is the most likely diagnosis?", "options": [{"label": "A", "text": "Acute transplant rejection", "correct": false}, {"label": "B", "text": "Chronic transplant rejection", "correct": false}, {"label": "C", "text": "Graft-versus-host disease", "correct": true}, {"label": "D", "text": "Immune reconstitution inflammatory syndrome", "correct": false}], "correct_answer": "C. Graft-versus-host disease", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male patient who has undergone kidney transplantation is now presenting with signs of renal dysfunction. Which complement activation product is a known histological marker for the diagnosis of antibody-mediated rejection in transplant biopsies?", "options": [{"label": "A", "text": "C3d", "correct": false}, {"label": "B", "text": "C5a", "correct": false}, {"label": "C", "text": "C3b", "correct": false}, {"label": "D", "text": "C4d", "correct": true}], "correct_answer": "D. C4d", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/CRirM7HuRTL9eXPCUvXn1737002920.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presented with oliguria for the last three days. She is a known case of diabetic nephropathy and underwent an allogeneic renal transplant four years ago. The physician suspects a possibility of graft rejection. Which of the following is not true regarding the suspected condition in this patient?", "options": [{"label": "A", "text": "Predominantly antibody-mediated reaction", "correct": true}, {"label": "B", "text": "Manifests as interstitial fibrosis and narrowing of graft blood vessels", "correct": false}, {"label": "C", "text": "HPE shows duplication of the basement membrane", "correct": false}, {"label": "D", "text": "Its morphologic correlate in the lung is bronchiolitis obliterans", "correct": false}], "correct_answer": "A. Predominantly antibody-mediated reaction", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/oi1b1jDV6iwaXvgLhdOH1737002779.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 17 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 35-year-old woman presents to the clinic with sudden hives, facial swelling, and difficulty breathing shortly after eating shrimp at a restaurant. She reports similar reactions in the past. She appears anxious, with pronounced facial swelling and wheezing. Which sequence correctly describes the immunological events in this type of reaction?", "options": [{"label": "A", "text": "Allergen exposure → Mast cell activation → IgE production → Th2 cell activation → Release of inflammatory mediators", "correct": false}, {"label": "B", "text": "Th2 cell activation → Allergen exposure → IgE production → Mast cell activation → Release of inflammatory mediators", "correct": false}, {"label": "C", "text": "Allergen exposure → Th2 cell activation → IgE production → Mast cell activation → Release of inflammatory mediators", "correct": true}, {"label": "D", "text": "Allergen exposure → Th2 cell activation → Mast cell activation → IgE production → Release of inflammatory mediators", "correct": false}], "correct_answer": "C. Allergen exposure → Th2 cell activation → IgE production → Mast cell activation → Release of inflammatory mediators", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/0pjH5lYaciSUEfieaQsn1737002164.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Synonyms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Immediate hypersensitivity</li>\n<li>Allergy</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs in previously sensitised individuals to an antigen, where the <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> binds to <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> antibodies on <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Local</li>\n<li>Systemic</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following cytokines acts on B cells to stimulate class switching to IgE and promotes the development of additional Th2 cells in type I hypersensitivity reactions?", "options": [{"label": "A", "text": "IL-4", "correct": true}, {"label": "B", "text": "IL-5", "correct": false}, {"label": "C", "text": "IL-13", "correct": false}, {"label": "D", "text": "IL-10", "correct": false}], "correct_answer": "A. IL-4", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Interleukins</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Role</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>IL-4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Key <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> in driving the allergic response</li>\n<li>Enhances Ig E-mediated reaction</li>\n<li>Stimulates B cells to undergo class switching to <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> and promotes the expansion of Th2 cells</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>IL-5 (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Development and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of eosinophils→ Recruited to the site of <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> exposure→ Release <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> mediators and enzymes→ Tissue damage and inflammation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>IL-13 (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Amplifies <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> production</li>\n<li>Acts on epithelial cells to stimulate <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> secretion</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>IL-10 (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anti-inflammatory cytokine</li>\n<li>Inhibits <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> production by Th1 cells and macrophages.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/vFcSFhcqpneVCJEsXNTT1747669166.mp3", "video": ""}, {"text": "A 45-year-old patient with a history of allergic asthma presents with worsening respiratory symptoms. The sputum sample shows the presence of Charcot-Leyden crystals. Which of the following is NOT typically associated with this phase of hypersensitivity reaction?", "options": [{"label": "A", "text": "Recruitment of eosinophils to the site of inflammation by chemokines like eotaxin", "correct": false}, {"label": "B", "text": "Production of IL-5 by Th2 cells to activate eosinophils", "correct": false}, {"label": "C", "text": "Release of histamine and tryptase by eosinophils", "correct": true}, {"label": "D", "text": "Liberation of major basic protein and eosinophil cationic protein by activated eosinophils", "correct": false}], "correct_answer": "C. Release of histamine and tryptase by eosinophils", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/I0s4q2L46HBmlj35Rfhv1737002264.png", "https://image.prepladder.com/content/WEfL0kSqON3q8riK9Sh51737002333.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Early phase reaction</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Late phase reaction</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediate (within minutes of <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> exposure).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Delayed (several hours after exposure) and can last for days.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells involved</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mast cells, basophils.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Eosinophils, T lymphocytes.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cellular events</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Activation of <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells and basophils.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Recruitment and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of leukocytes, especially eosinophils.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mediators</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Histamine, leukotrienes (LTB4, LTC4, LTD4), prostaglandins (PGD2) and Platelet-activating factor (PAF).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytokines (e.g., IL-4, IL-5, TNF), chemokines (e.g., eotaxin)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Initiating event</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Exposure to <span class=\"customMeta\" data-dictid=\"7396dd35a41692777181bd7038fa9b\">allergen</span> triggers <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> of <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> on <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells/basophils.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Recurrent inflammation, sustained by recruited leukocytes.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Effect on tissues</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vasodilation, increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability, smooth muscle contraction.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sustained <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and tissue damage due to <span class=\"customMeta\" data-dictid=\"00346a7f211692777191e91c2af9fc\">leukocyte</span> infiltration.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical manifestations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"a8dad7cd171692777197e6d4ac2a1c\">rhinitis</span> (hay fever), <span class=\"customMeta\" data-dictid=\"7e814d15c31692777201fe0d9c1a61\">urticaria</span> (hives), <span class=\"customMeta\" data-dictid=\"5f26e5a9e916927771816a407f7545\">Angioedema</span> bronchoconstriction.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Allergic <span class=\"customMeta\" data-dictid=\"76891bb6e91692777182cda16e1db6\">asthma</span> exacerbation, persistent inflammation, and tissue damage.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Therapeutic Approach</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Antihistamines for <span class=\"customMeta\" data-dictid=\"509310d4411692777199f2ffdb7769\">symptomatic</span> relief.</li>\n<li>Adrenaline in anaphylactic shock</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Broad-spectrum anti-inflammatory drugs (e.g., steroids) to suppress <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and prevent tissue damage.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not an example of a Type I hypersensitivity reaction?", "options": [{"label": "A", "text": "Graft rejection", "correct": true}, {"label": "B", "text": "Vernal Keratoconjunctivitis", "correct": false}, {"label": "C", "text": "Casoni test", "correct": false}, {"label": "D", "text": "P-K reactions", "correct": false}], "correct_answer": "A. Graft rejection", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following diseases is not an example of a Type II hypersensitivity reaction?", "options": [{"label": "A", "text": "Rheumatic fever", "correct": false}, {"label": "B", "text": "Multiple sclerosis", "correct": true}, {"label": "C", "text": "Immune thrombocytopenic purpura", "correct": false}, {"label": "D", "text": "Pernicious anaemia", "correct": false}], "correct_answer": "B. Multiple sclerosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/OsCMrwdnntVJldMAzuhR1737002416.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mnemonic: My <span class=\"customMeta\" data-dictid=\"a3c99b36b6169277718332b20cc393\">Blood Group</span> Is Rh Positive</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>My</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myasthenia Gravis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Blood </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> reaction</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Group </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Good pasture syndrome,</p>\n<p>Graves disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Is </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immune <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anaemia,</p>\n<p>Immune thrombocytopenic purpura</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>R </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rh incompatibility,</p>\n<p>Rheumatic fever</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>H</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hyperacute transplant rejection</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Positive</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pemphigus (Bullous),<strong> </strong></p>\n<p>Pernicious Anemia</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/WtyAkClfAWAS7jxMGA0d1746450412.mp3", "video": ""}, {"text": "Which of the following statements regarding pernicious anaemia is incorrect?", "options": [{"label": "A", "text": "Natural Killer (NK) cells participate in Antibody-dependent cellular cytotoxicity.", "correct": false}, {"label": "B", "text": "Opsonisation involves IgG antibodies coating cells, enhancing phagocytosis via Fc receptors.", "correct": false}, {"label": "C", "text": "When antibodies deposit in intracellular tissues, the injury is due to inflammation and not phagocytosis or cell lysis.", "correct": true}, {"label": "D", "text": "Myasthenia gravis is an example of antibody-mediated cell surface receptor dysfunction.", "correct": false}], "correct_answer": "C. When antibodies deposit in intracellular tissues, the injury is due to inflammation and not phagocytosis or cell lysis.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<thead>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Mechanisms of <span class=\"customMeta\" data-dictid=\"bd04ba63bc1692777201f54e0ee060\">Type II</span> hypersensitivity</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Description</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Examples</strong></p>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Opsonisation and <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">Phagocytosis</span> </strong><br/>\n<strong>(Option B)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>IgG antibodies coat cells, helping phagocytes recognise circulating antigen-opsonin complexes through Fc receptors or <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> activation, leading to phagocytosis.</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Autoimmune <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anaemia</p>\n</li>\n<li>\n<p>Immune thrombocytopenic purpura</p>\n</li>\n<li>\n<p>Rh <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> disease of the newborn.</p>\n</li>\n</ul>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Complement activation</strong></p>\n<p><strong>and inflammation</strong><br/>\n<strong>(Option C)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>Antibody deposition in <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> tissues triggers inflammation, not <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> or cell lysis. The deposited antibodies <span class=\"customMeta\" data-dictid=\"dddc752e1716927771807f985bb8bb\">activate</span> the <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> system, leading to the attraction of neutrophils and monocytes via their Fc receptors. Activated leukocytes release enzymes, resulting in tissue damage.</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Goodpasture syndrome</p>\n</li>\n<li>\n<p>Acute rheumatic fever</p>\n</li>\n</ul>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Antibody-dependent</strong></p>\n<p><strong>cellular <span class=\"customMeta\" data-dictid=\"569eae3b3516927771850ba9123b99\">cytotoxicity</span> (ADCC)</strong><br/>\n<strong>(Option A)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>Natural killer cells bind to antibody-antigen complexes, inducing apoptotic cell death.</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Pernicious anemia</p>\n</li>\n<li>\n<p>Insulin resistant diabetes</p>\n</li>\n</ul>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Antibody-mediated <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> <span class=\"customMeta\" data-dictid=\"3662597407169277718640a12868f5\">dysfunction</span> (non-cytotoxic)</strong><br/>\n<strong>(Option D)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>Antibodies physically impair or dysregulate <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> function by binding to cell surface receptors. This includes both <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> (e.g., <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> hormone <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> in Graves disease) and <span class=\"customMeta\" data-dictid=\"f03ca2d2a716927771901227bc175a\">inhibition</span> (e.g., <span class=\"customMeta\" data-dictid=\"a79a62c36e169277718062f9630d56\">acetylcholine</span> <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> in <span class=\"customMeta\" data-dictid=\"6fa809ad22169277719323eaa30f1e\">Myasthenia</span> gravis).</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Graves disease</p>\n</li>\n<li>\n<p>Myasthenia gravis</p>\n</li>\n</ul>\n</th>\n</tr>\n</thead>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:686px\">\n<thead>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Mechanisms of <span class=\"customMeta\" data-dictid=\"bd04ba63bc1692777201f54e0ee060\">Type II</span> hypersensitivity</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Description</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Examples</strong></p>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Opsonisation and <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">Phagocytosis</span> </strong><br/>\n<strong>(Option B)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>IgG antibodies coat cells, helping phagocytes recognise circulating antigen-opsonin complexes through Fc receptors or <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> activation, leading to phagocytosis.</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Autoimmune <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anaemia</p>\n</li>\n<li>\n<p>Immune thrombocytopenic purpura</p>\n</li>\n<li>\n<p>Rh <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> disease of the newborn.</p>\n</li>\n</ul>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Complement activation</strong></p>\n<p><strong>and inflammation</strong><br/>\n<strong>(Option C)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>Antibody deposition in <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> tissues triggers inflammation, not <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> or cell lysis. The deposited antibodies <span class=\"customMeta\" data-dictid=\"dddc752e1716927771807f985bb8bb\">activate</span> the <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> system, leading to the attraction of neutrophils and monocytes via their Fc receptors. Activated leukocytes release enzymes, resulting in tissue damage.</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Goodpasture syndrome</p>\n</li>\n<li>\n<p>Acute rheumatic fever</p>\n</li>\n</ul>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Antibody-dependent</strong></p>\n<p><strong>cellular <span class=\"customMeta\" data-dictid=\"569eae3b3516927771850ba9123b99\">cytotoxicity</span> (ADCC)</strong><br/>\n<strong>(Option A)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>Natural killer cells bind to antibody-antigen complexes, inducing apoptotic cell death.</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Pernicious anemia</p>\n</li>\n<li>\n<p>Insulin resistant diabetes</p>\n</li>\n</ul>\n</th>\n</tr>\n<tr>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p><strong>Antibody-mediated <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> <span class=\"customMeta\" data-dictid=\"3662597407169277718640a12868f5\">dysfunction</span> (non-cytotoxic)</strong><br/>\n<strong>(Option D)</strong></p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<p>Antibodies physically impair or dysregulate <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> function by binding to cell surface receptors. This includes both <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> (e.g., <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> hormone <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> in Graves disease) and <span class=\"customMeta\" data-dictid=\"f03ca2d2a716927771901227bc175a\">inhibition</span> (e.g., <span class=\"customMeta\" data-dictid=\"a79a62c36e169277718062f9630d56\">acetylcholine</span> <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> in <span class=\"customMeta\" data-dictid=\"6fa809ad22169277719323eaa30f1e\">Myasthenia</span> gravis).</p>\n</th>\n<th scope=\"col\" style=\"vertical-align:top\">\n<ul>\n<li>\n<p>Graves disease</p>\n</li>\n<li>\n<p>Myasthenia gravis</p>\n</li>\n</ul>\n</th>\n</tr>\n</thead>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An 11-year-old boy presents to the emergency department with swelling in his face and legs, decreased urine output, and dark-colored urine. His parents reported that he had a sore throat about three weeks ago, which resolved without treatment. Urinalysis shows proteinuria and hematuria. Which type of hypersensitivity reaction is associated with this condition?", "options": [{"label": "A", "text": "Type I hypersensitivity", "correct": false}, {"label": "B", "text": "Type II hypersensitivity", "correct": false}, {"label": "C", "text": "Type III hypersensitivity", "correct": true}, {"label": "D", "text": "Type IV hypersensitivity", "correct": false}], "correct_answer": "C. Type III hypersensitivity", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is typically associated with localized immune-complex mediated hypersensitivity?", "options": [{"label": "A", "text": "Serum sickness", "correct": false}, {"label": "B", "text": "Arthus reaction", "correct": true}, {"label": "C", "text": "Membranous glomerulonephritis", "correct": false}, {"label": "D", "text": "Reactive arthritis", "correct": false}], "correct_answer": "B. Arthus reaction", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Systemic <span class=\"customMeta\" data-dictid=\"adcadb82091692777201d084ed114c\">type III</span> hypersensitivity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Localised <span class=\"customMeta\" data-dictid=\"adcadb82091692777201d084ed114c\">type III</span> hypersensitivity</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involves the widespread formation of immune complexes in <span class=\"customMeta\" data-dictid=\"337d16dac5169277718474b97f6e4a\">circulation</span> and can deposit in various tissues and organs throughout the body, including the kidneys (leading to glomerulonephritis), joints, skin, blood vessels, and other sites. (e.g., in chronic infections or <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> diseases).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immune complexes are deposited at specific sites of <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> exposure, such as the skin (as in the Arthus reaction) or joint spaces, leading to local <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> (localized swelling, redness, pain) and tissue damage.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old man presents with jaundice and fatigue, recently diagnosed with hepatitis B infection. Further investigation reveals abnormal liver function tests, indicating hepatic injury. Which of the following statements regarding the mechanisms of hypersensitivity involved in this case is true?", "options": [{"label": "A", "text": "CD8+ T cells differentiate into Th1 and Th17 cells upon antigen exposure", "correct": false}, {"label": "B", "text": "CD4+ T cells differentiate into Th2 cells upon exposure to antigen", "correct": false}, {"label": "C", "text": "Cytotoxic T-lymphocytes (CTLs) directly kill virus-infected cells via the Fas-Fas ligand pathway", "correct": true}, {"label": "D", "text": "Perforin-granzyme-dependent killing is a mechanism employed by CD4+ T cells", "correct": false}], "correct_answer": "C. Cytotoxic T-lymphocytes (CTLs) directly kill virus-infected cells via the Fas-Fas ligand pathway", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/xYnMJOK7ZteJyeo8406J1737002562.png", "https://image.prepladder.com/content/8JX7gJvBBNZO72POXmve1737002593.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Mechanisms of <span class=\"customMeta\" data-dictid=\"4019d01072169277720163b0f7ec43\">Type IV</span> hypersensitivity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Examples</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cytokine-mediated inflammation<br/>\n\t\t\t(mediated by CD4+ T cells)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD4+ T cells recognise protein antigens presented by APCs and <span class=\"customMeta\" data-dictid=\"c9001edbf216927771860f3475b44c\">differentiate</span> into Th1 and Th17 cells<strong> </strong><strong>(Options A and B ruled out)</strong>.</p>\n<p>Th1 cells <span class=\"customMeta\" data-dictid=\"7b8c92219216927771981950fdd0e8\">secrete</span> cytokines like IFN-γ, activating macrophages to cause tissue damage and fibrosis. Th17 cells produce IL-17 to recruit neutrophils, promoting inflammation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Tuberculin test (a classic example of delayed-type hypersensitivity)</li>\n<li>Granulomas</li>\n<li>Contact dermatitis</li>\n<li>Rheumatoid arthritis</li>\n<li>Multiple sclerosis</li>\n<li>IBD</li>\n<li>Psoriasis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"227\" src=\"https://image.prepladder.com/content/xYnMJOK7ZteJyeo8406J1737002562.png\" width=\"541\"/></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>T <span class=\"customMeta\" data-dictid=\"5f09d353dd1692777184d29afdb259\">cell-mediated cytotoxicity</span> (mediated by CD8+ T cells)</strong></p>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytotoxic <span class=\"customMeta\" data-dictid=\"9f1d97eb2b1692777200b3926afd54\">T lymphocytes</span> (CTLs) directly kill antigen-bearing target cells, including tumour cells, virus-infected cells, and <span class=\"customMeta\" data-dictid=\"812d0ddedb1692777181aaf62743b1\">allogeneic</span> tissue, during <span class=\"customMeta\" data-dictid=\"a283380a9a1692777188549537a964\">graft</span> rejection. CTLs use perforin-granzyme-dependent killing <strong>(Option D ruled out)</strong> and Fas-Fas ligand-dependent killing mechanisms to induce <span class=\"customMeta\" data-dictid=\"4bfa3e6f2c1692777181c53b124cf7\">apoptosis</span> in target cells. <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Type 1 DM</li>\n<li>Hepatic injury in <span class=\"customMeta\" data-dictid=\"b85d24394e1692777188090f0084ef\">HBV</span> infection</li>\n<li>Graft vs host disease</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"214\" src=\"https://image.prepladder.com/content/8JX7gJvBBNZO72POXmve1737002593.png\" width=\"596\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/7pOkw3ujOqbMm1FTsJ4s1745345790.mp3", "video": ""}, {"text": "A 35-year-old woman presents with a history of persistent cough and unintentional weight loss. The physician suspects a TB infection and performs a tuberculin skin test. Which of the following is not an example of the type of hypersensitivity reaction associated with this test?", "options": [{"label": "A", "text": "Contact dermatitis from poison ivy exposure.", "correct": false}, {"label": "B", "text": "Rheumatoid arthritis.", "correct": false}, {"label": "C", "text": "Crohn's disease.", "correct": false}, {"label": "D", "text": "Reactive arthritis.", "correct": true}], "correct_answer": "D. Reactive arthritis.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements accurately describes Type V hypersensitivity?", "options": [{"label": "A", "text": "Antibodies bind to cell surface receptors, leading to altered cellular function", "correct": true}, {"label": "B", "text": "Immune complexes form and deposit in tissues, triggering localized inflammation and damage.", "correct": false}, {"label": "C", "text": "Antibodies target cell surface antigens, resulting in complement activation and cell destruction.", "correct": false}, {"label": "D", "text": "IgE antibodies mediate the release of histamine from mast cells, causing immediate allergic reactions.", "correct": false}], "correct_answer": "A. Antibodies bind to cell surface receptors, leading to altered cellular function", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following sequences correctly describes the phases of pathogenesis in Type III hypersensitivity?", "options": [{"label": "A", "text": "Formation of immune complexes → Inflammation and tissue injury → Deposition in blood vessels.", "correct": false}, {"label": "B", "text": "Deposition of immune complexes → Formation of antibodies → Tissue injury and inflammation.", "correct": false}, {"label": "C", "text": "Formation of immune complexes → Deposition in tissues → Inflammation and tissue injury.", "correct": true}, {"label": "D", "text": "Antibody production → Immune complex formation → Activation of cytotoxic T cells.", "correct": false}], "correct_answer": "C. Formation of immune complexes → Deposition in tissues → Inflammation and tissue injury.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is not a feature of innate immunity?", "options": [{"label": "A", "text": "Present since birth", "correct": false}, {"label": "B", "text": "Made of epithelial barriers, phagocytes, innate lymphoid cells (ILCs) and NK cells", "correct": false}, {"label": "C", "text": "Quick, non-specific response", "correct": false}, {"label": "D", "text": "Has a lag phase between exposure and response", "correct": true}], "correct_answer": "D. Has a lag phase between exposure and response", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Innate/native immunity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acquired/adaptive immunity</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present since birth (Option A)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs after exposure to the pathogen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Quick, non-specific response (Option C)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Slower, specific response to a pathogen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No <span class=\"customMeta\" data-dictid=\"6eec2212b91692777189b54f3d9066\">immunological</span> memory</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Has <span class=\"customMeta\" data-dictid=\"6eec2212b91692777189b54f3d9066\">immunological</span> memory</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Examples include :</p>\n<ul>\n<li>Epithelial barriers like skin, GIT. (Option B)</li>\n<li>Plasma proteins like C-reactive protein.</li>\n<li>Neutrophils, macrophages, <span class=\"customMeta\" data-dictid=\"77f797c5e8169277718535480fa7fd\">dendritic</span> cells, complement.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cells are of 2 types :</p>\n<ul>\n<li>B lymphocytes: Provides <span class=\"customMeta\" data-dictid=\"1a6d065f851692777189ba5533d1ef\">humoral</span> <span class=\"customMeta\" data-dictid=\"4f9ee631c21692777189b1e0cdc91c\">immunity</span> and produces antibodies</li>\n<li>2. T lymphocytes: Involved in <span class=\"customMeta\" data-dictid=\"5eb50cf561169277718491671207db\">cell-mediated immunity</span> and help with <span class=\"customMeta\" data-dictid=\"4f9ee631c21692777189b1e0cdc91c\">immunity</span> against <span class=\"customMeta\" data-dictid=\"a621be29da16927771901bc91014d1\">intracellular</span> microbes</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with a fever, sore throat, and swollen lymph nodes. He is diagnosed with a viral infection. Which of the following cells is most likely involved in the early defense against the offending agent in this patient?", "options": [{"label": "A", "text": "NK cells", "correct": true}, {"label": "B", "text": "T cells", "correct": false}, {"label": "C", "text": "Macrophages", "correct": false}, {"label": "D", "text": "Histocytes", "correct": false}], "correct_answer": "A. NK cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ocS64AHvSX82RjwIhLDr1737006165.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 20-year-old medical student went for a screening health test and was injected with PPD intradermally. Identify the immune cell in the skin that picks up the PPD to present it to T cells.", "options": [{"label": "A", "text": "Langhans cells", "correct": false}, {"label": "B", "text": "Follicular dendritic cells", "correct": false}, {"label": "C", "text": "Langerhans cells", "correct": true}, {"label": "D", "text": "Natural killer cells", "correct": false}], "correct_answer": "C. Langerhans cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/WyKaWwyYqWB0lBXERDv71737006246.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types of APCs</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Professional APCs</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>These are further divided into</p>\n<ul>\n<li>Dendritic cells</li>\n<li>B cells</li>\n<li>Macrophages</li>\n</ul>\n<p>These <span class=\"customMeta\" data-dictid=\"77f797c5e8169277718535480fa7fd\">dendritic</span> cells are present in two regions</p>\n<ul>\n<li>Skin: They are called as Langerhans cells</li>\n<li>Lymph node: <span class=\"customMeta\" data-dictid=\"031a38f17a16927772036476ede2ae\">Follicular</span> <span class=\"customMeta\" data-dictid=\"77f797c5e8169277718535480fa7fd\">dendritic</span> cells (reservoirs for HIV)</li>\n</ul>\n<p>(Langhans cells are not antigen-presenting cells, these are the giant cells generally found in TB).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-professional APCs</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It includes</p>\n<ul>\n<li>Thymic epithelial cells</li>\n<li>Endothelial cells</li>\n<li>Fibroblasts</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following immune cells with their markers. Cells Markers 1. Natural killer cell a. CD 19 2. T lymphocyte b. CD 16 3. B lymphocyte c. CD 11 4. Monocyte d. CD 3", "options": [{"label": "A", "text": "1-a; 2-d; 3-b; 4-c", "correct": false}, {"label": "B", "text": "1-b; 2-a; 3-c; 4-d", "correct": false}, {"label": "C", "text": "1-b; 2-d; 3-a; 4-c", "correct": true}, {"label": "D", "text": "1-a; 2-c; 3-d; 4-b", "correct": false}], "correct_answer": "C. 1-b; 2-d; 3-a; 4-c", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Markers</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Natural killer cell</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD 16, 56, 94</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>T lymphocyte</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD 1, 2, 3, 4, 5, 6, 7, 8, 28, 40L.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>B lymphocyte</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD 10, 19, 20, 21, 22, 23, 40, 79</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Monocyte</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CD 11, 14, 64</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Toll-like receptors are seen in which of the following cells?", "options": [{"label": "A", "text": "Macrophages", "correct": false}, {"label": "B", "text": "Endothelial cells", "correct": false}, {"label": "C", "text": "Natural killer cells", "correct": false}, {"label": "D", "text": "All of the above", "correct": true}], "correct_answer": "D. All of the above", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/oGHarIlf5zijXfbyBSlX1737005559.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Receptor Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cellular Compartment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Function</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Toll-like Receptors (TLRs)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Plasma membrane, endosomal vesicles</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Detect <span class=\"customMeta\" data-dictid=\"04f4b6dbf71692777192ca0c4f70fa\">microbial</span> components (e.g., bacterial lipopolysaccharides, <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> RNA)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>C-type <span class=\"customMeta\" data-dictid=\"32850def99169277719135597fc165\">Lectin</span> Receptors (CLRs)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Plasma <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> of macrophages and <span class=\"customMeta\" data-dictid=\"77f797c5e8169277718535480fa7fd\">dendritic</span> cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Detect fungal glycans</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>RIG-like Receptors (RLRs)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytosol</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Detect nucleic acids of viruses replicating in the cytoplasm</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>NOD-like Receptors (NLRs)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytosol</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Recognise products released from necrotic or damaged cells associated with <span class=\"customMeta\" data-dictid=\"282201f8341692777190c016904203\">inflammasome</span> to release IL-1</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An 8-year-old child is brought with complaints of fever and burning micturition. She was diagnosed to have UTI with toxin-producing strains of E.coli. Where are blood-borne antigens trapped in the immune response to these toxins?", "options": [{"label": "A", "text": "Lymph nodes", "correct": false}, {"label": "B", "text": "Thymus", "correct": false}, {"label": "C", "text": "Bone marrow", "correct": false}, {"label": "D", "text": "Spleen", "correct": true}], "correct_answer": "D. Spleen", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/OMc8FfQ16yBlUqbm2eLn1737006378.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aspect </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> organ </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Secondary <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> organ</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Function </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Development and <span class=\"customMeta\" data-dictid=\"76948f718016927771924774ade7e9\">maturation</span> of T and B lymphocytes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Site of adaptive immune responses to antigens</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Organ </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Thymus (T cell development)</li>\n<li>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> (all blood cells, including <span class=\"customMeta\" data-dictid=\"2241e1d9a11692777193d3ceb43d49\">naïve</span> B cells)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Lymph nodes</li>\n<li>Spleen</li>\n<li>Mucosal and <span class=\"customMeta\" data-dictid=\"94f1c8df1f1692777185bd6a7c3fff\">cutaneous</span> <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> tissues</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following HLA gene regions encodes Class II MHC molecules?", "options": [{"label": "A", "text": "HLA-A", "correct": false}, {"label": "B", "text": "HLA-B", "correct": false}, {"label": "C", "text": "HLA-C", "correct": false}, {"label": "D", "text": "HLA-D", "correct": true}], "correct_answer": "D. HLA-D", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/KrJwnSCWlqBtHoofcmZh1737006461.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gene region</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Encoded products</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class I</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>HLA-A, HLA-B, and HLA-C</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class II</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>HLA-DP, HLA-DQ, and HLA-DR.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class III</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Tumor <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> factor (TNF), <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> and heat shock proteins</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presented with a fever and loose stool for one week. He was diagnosed with typhoid infection. Which of the following MHC class is responsible for antigen presentation in this patient?", "options": [{"label": "A", "text": "Class I", "correct": false}, {"label": "B", "text": "Class II", "correct": true}, {"label": "C", "text": "Class III", "correct": false}, {"label": "D", "text": "Non-MHC-dependent antigen presentation", "correct": false}], "correct_answer": "B. Class II", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class I</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MHC class I molecules present <span class=\"customMeta\" data-dictid=\"2a7f0b780c1692777187fe83ec76b1\">endogenous</span> antigens derived from <span class=\"customMeta\" data-dictid=\"a621be29da16927771901bc91014d1\">intracellular</span> pathogens, such as viruses and some bacteria.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class II</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MHC class II molecules present <span class=\"customMeta\" data-dictid=\"18a9d4c52716927771878ee08e63ee\">exogenous</span> antigens derived from <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> pathogens, such as <span class=\"customMeta\" data-dictid=\"361c327ab81692777198a1cd507e57\">Salmonella</span> typhi, the <span class=\"customMeta\" data-dictid=\"ff3e9793d01692777182b598b4a090\">bacterium</span> responsible for <span class=\"customMeta\" data-dictid=\"f2f6f9068216927772016cacf26183\">typhoid</span> fever.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class III</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MHC class III molecules are not involved in <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> presentation. They encode components of the <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> system and other immune-related molecules.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-MHC-dependent <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>While non-MHC-dependent <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> presentation can occur through mechanisms like CD1 molecules presenting <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> antigens.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which component functions as the antigen binding site in MHC complexes 1 and 2, respectively?", "options": [{"label": "A", "text": "MHC 1 - beta microglobulin; MCH 2 - alpha 3 domain", "correct": false}, {"label": "B", "text": "MHC 1 - alpha 1 and 2; MHC 2 - alpha 1 and beta 1", "correct": true}, {"label": "C", "text": "MHC 1 - alpha 1 and beta 1; MHC 2 - alpha 1 and 2", "correct": false}, {"label": "D", "text": "MHC 1 - invariant chain; MHC 2 - beta microglobulin", "correct": false}], "correct_answer": "B. MHC 1 - alpha 1 and 2; MHC 2 - alpha 1 and beta 1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/cHUEnGRUP2fZv9j3weyu1737005742.png", "https://image.prepladder.com/content/YOoQ9iFe0KKc7a4ZYLJj1737005782.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A newborn delivered by a mother who received no prenatal care is being evaluated. On examination, the baby has severe oedema, icterus, and organomegaly and is in respiratory distress. What immunoglobulin class was responsible for this child’s presentation?", "options": [{"label": "A", "text": "IgG", "correct": true}, {"label": "B", "text": "IgM", "correct": false}, {"label": "C", "text": "IgA", "correct": false}, {"label": "D", "text": "IgE", "correct": false}], "correct_answer": "A. IgG", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ROW6ar3HfCjBo0oxRkRn1737006827.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old male presents to the emergency department with a fever, productive cough, and shortness of breath. He is diagnosed with pneumonia. Which of the following cytokines is most likely to be elevated in this patient due to the activation of classical macrophages in response to the infection?", "options": [{"label": "A", "text": "Interleukin- 1", "correct": true}, {"label": "B", "text": "Interleukin- 2", "correct": false}, {"label": "C", "text": "Interleukin- 4", "correct": false}, {"label": "D", "text": "Interleukin- 10", "correct": false}], "correct_answer": "A. Interleukin- 1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ej7jKqIU9yDQ67ZnDSOp1737005913.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stimuli</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Functions and Secretions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Role</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Classical (M1) Activation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microbial products (e.g., LPS), IFN-γ</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pro-inflammatory and <span class=\"customMeta\" data-dictid=\"344e6c36131692777192e96cc1dbc8\">microbicidal</span> functions: NO, lysosomal enzymes, TNF-α, IL-1, IL-12, IL-23</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Host defense</li>\n<li>Microbial destruction</li>\n<li>Inflammation</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alternative (M2) Activation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-4, IL-13 <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tissue repair, resolution of inflammation, <span class=\"customMeta\" data-dictid=\"9b0ae3750916927771986c15d4ff4d\">secretion</span> of TGF-β, growth factors, IL-10</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Tissue remodeling</li>\n<li>Angiogenesis, Immunoregulation</li>\n<li>Wound healing</li>\n<li>Tissue repair and homeostasis</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old boy is brought with a history of eating sand. His stool examination showed Ascaris eggs. What type of T-cell is responsible for dealing with this infection?", "options": [{"label": "A", "text": "TH1 cells", "correct": false}, {"label": "B", "text": "TH2 cells", "correct": true}, {"label": "C", "text": "TH17 cells", "correct": false}, {"label": "D", "text": "Treg cells", "correct": false}], "correct_answer": "B. TH2 cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/omOhfWcXVmPS2h0W7NAv1737006614.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:588px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Subtype</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Function and Characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Key Cytokines</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TH1</strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Involved in chronic <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> diseases. Activated by IL-12 from APCs. <span class=\"customMeta\" data-dictid=\"7b8c92219216927771981950fdd0e8\">Secrete</span> IFN-gamma, activating macrophages.</li>\n<li>Stimulates macrophages to <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> <span class=\"customMeta\" data-dictid=\"ed5f81953d1692777187529a6de318\">epithelioid</span> cells and giant cells.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IFN-gamma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TH2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Responsible for the alternative <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> of <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> activation. Release cytokines IL-4, IL-5, and IL-13.</li>\n<li>To expel parasites from the body, stimulate <span class=\"customMeta\" data-dictid=\"7eba65a7251692777187eaa3b48258\">eosinophil</span> activation, <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> production (especially IgE), and <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> production.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-4, IL-5, IL-13</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>TH17</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Defend against <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> bacteria and fungi. <span class=\"customMeta\" data-dictid=\"7b8c92219216927771981950fdd0e8\">Secrete</span> IL-17 and IL-22, attracting neutrophils and monocytes.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-17, IL-22</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treg (T regulatory)</strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Suppresses immune response, maintains <span class=\"customMeta\" data-dictid=\"50796581771692777189251fbe5ef1\">homeostasis</span> and self-tolerance.</li>\n<li>Inhibit T cell <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> production, preventing <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> reaction.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-10, TGF-beta</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tfh (Follicular T helper)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Assist B cells in rapid <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> production.</li>\n<li>Help produce antibodies with greater affinity.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-21</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 45-year-old man with a history of poorly controlled diabetes presents to the hospital with complaints of fever, productive cough, and chest pain. Chest imaging reveals the presence of multiple cavitary lesions in the lung parenchyma. Microscopic examination of lung tissue obtained via biopsy demonstrates numerous neutrophils and macrophages surrounding fungal hyphae. Which of the following phenomena is most likely associated with the formation of these cavitary lesions?", "options": [{"label": "A", "text": "Activation of complement proteins", "correct": false}, {"label": "B", "text": "Release of lysozymes from neutrophils", "correct": false}, {"label": "C", "text": "Impaired phagocytosis", "correct": true}, {"label": "D", "text": "Formation of neutrophil extracellular traps (NETs)", "correct": false}], "correct_answer": "C. Impaired phagocytosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/hmW0wEfd5oUIIDOXzoAk1737519784.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/hARFxAeQulWdek4rpDC71749025545.mp3", "video": ""}, {"text": "A 6-month-old male infant presents with recurrent bacterial infections, including otitis media and pneumonia. Laboratory investigations reveal markedly reduced levels of all immunoglobulin classes (IgG, IgA, and IgM). Flow cytometry analysis shows a complete absence of mature B cells in peripheral blood. Which of the following gene mutations is most likely responsible for this condition?", "options": [{"label": "A", "text": "BTK gene", "correct": true}, {"label": "B", "text": "LYST gene", "correct": false}, {"label": "C", "text": "WASP gene", "correct": false}, {"label": "D", "text": "ADA gene", "correct": false}], "correct_answer": "A. BTK gene", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:645px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diseases</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Findings</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>BTK gene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>X-linked <span class=\"customMeta\" data-dictid=\"2154ae19fc1692777180ad72742d0b\">agammaglobulinemia</span> or</p>\n<p>Bruton's Hypogammaglobulinemia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hypogammaglobulinemia</p>\n<p>(↓IgG, IgA, and IgM).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LYST gene</p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chediak-Higashi syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Giant granules in neutrophils</p>\n<p>are visible in <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood</p>\n<p>smears.</p>\n<p>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>WASP gene</p>\n<p><strong>(Option C)</strong></p>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Wiskott-Aldrich Syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Triad of thrombocytopenia,</p>\n<p>eczema, and recurrent</p>\n<p>infections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ADA gene</p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe Combined</p>\n<p>Immunodeficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Profound lymphopenia</p>\n<p>(primarily T-cells) and absent or</p>\n<p>reduced <span class=\"customMeta\" data-dictid=\"7cdf82ff98169277718029b0e108aa\">ADA</span> <span class=\"customMeta\" data-dictid=\"0f160e4e42169277718771b715516a\">enzyme</span> activity.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ffYc0dc9jU47E26eVD211739971723.mp3", "video": ""}, {"text": "Which of the following defects is most likely associated with Leukocyte Adhesion Deficiency Type 1 (LAD)-1?", "options": [{"label": "A", "text": "Defective synthesis of β2 integrin", "correct": true}, {"label": "B", "text": "Defective synthesis of Sialyl Lewis X modified glycoprotein", "correct": false}, {"label": "C", "text": "Defective FERMT3 gene", "correct": false}, {"label": "D", "text": "Myeloperoxidase deficiency", "correct": false}], "correct_answer": "A. Defective synthesis of β2 integrin", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/wXUeYwmlBANIRWQMKXbx1737520144.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LAD-1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LAD-2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LAD-3</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defective <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> of β2 chain of CD11/CD18 integrins (β2 integrin).</p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defective <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> of sialyl-Lewis X modified glycoprotein, a <span class=\"customMeta\" data-dictid=\"6e1f8c026516927771919d54418520\">ligand</span> for E- and P-selectins.</p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mutations in the FERMT3 genes.</p>\n<p><strong>(Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinical manifestations include delayed separation of the <span class=\"customMeta\" data-dictid=\"9cc3973459169277720194a0847477\">umbilical</span> cord <span class=\"customMeta\" data-dictid=\"cd187682b0169277719976b8127f36\">stump</span> in newborns, and <span class=\"customMeta\" data-dictid=\"c64e3a661b1692777197afc2ff7bca\">recurrent</span> bacterial infections.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinically, <span class=\"customMeta\" data-dictid=\"ad5f8a44f91692777191f70a74cc50\">LAD</span> 2 patients may exhibit a Bombay <span class=\"customMeta\" data-dictid=\"a3c99b36b6169277718332b20cc393\">Blood group</span> phenotype.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clinical presentation is similar to LAD-1, along with <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> disorders due to <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> dysfunction.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/MZ8DHhiGG0FJU2u7VYz91739974011.mp3", "video": ""}, {"text": "Which condition is characterized by recurrent catalase positive bacterial, and fungal infections, defective nitroblue tetrazolium (NBT) test results, and deficient reactive oxygen species production by phagocytes?", "options": [{"label": "A", "text": "Leukocyte Adhesion Deficiency", "correct": false}, {"label": "B", "text": "Hyper-IgM Syndrome", "correct": false}, {"label": "C", "text": "X-linked Agammaglobulinemia", "correct": false}, {"label": "D", "text": "Chronic Granulomatous Disease", "correct": true}], "correct_answer": "D. Chronic Granulomatous Disease", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old female presents to the clinic with complaints of abdominal discomfort and bloating. Upon further evaluation, an abdominal ultrasound reveals a heterogeneous mass within the right ovary. Subsequent histopathological examination of the ovarian mass demonstrates the presence of entotic cells. Which of the following best describes the process observed in the histopathological findings?", "options": [{"label": "A", "text": "Phagocytosis of apoptotic cells by neighboring cells", "correct": false}, {"label": "B", "text": "Engulfment of live cells by neighboring cells", "correct": true}, {"label": "C", "text": "Fusion of lysosomes within a cell leading to autophagy", "correct": false}, {"label": "D", "text": "Exocytosis of cellular debris from a damaged cell", "correct": false}], "correct_answer": "B. Engulfment of live cells by neighboring cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/fq9TjQ6hT09FiGyMBD4p1737520004.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is incorrect regarding Emperipolesis and Phagocytosis?", "options": [{"label": "A", "text": "Emperipolesis involves engulfment by any cell depending on disease; Phagocytosis involves engulfment by macrophages, neutrophils, and dendritic cells.", "correct": false}, {"label": "B", "text": "Emperipolesis doesn’t involve the killing of the cell; phagocytosis results in the degradation of engulfed cells.", "correct": false}, {"label": "C", "text": "Emperipolesis maintains internalized cell membrane integrity; Phagocytosis involves the fusion of engulfed material with lysosomes.", "correct": false}, {"label": "D", "text": "Emperipolesis is physiological; phagocytosis is pathological.", "correct": true}], "correct_answer": "D. Emperipolesis is physiological; phagocytosis is pathological.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:628px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Emperipolesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Phagocytosis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Emperipolesis is a <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> phenomenon characterized by the <span class=\"customMeta\" data-dictid=\"5d2d188b0b16927771903dc287d6a2\">internalization</span> of one cell within another without causing cell death.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Phagocytosis is a <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> process by which certain specialized cells engulf and digest foreign particles, pathogens, dead cells, and <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> debris.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The large cell dependant on organ/ disease</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Engulfing cells can be macrophages, neutrophils, and <span class=\"customMeta\" data-dictid=\"77f797c5e8169277718535480fa7fd\">dendritic</span> cells.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No killing of the internalized cell. The engulfed cell often remains <span class=\"customMeta\" data-dictid=\"915ca56f53169277720296a38e3e8e\">viable</span> within the host cell.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Typically digest and degrade the engulfed material such as bacteria or <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> debris.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The engulfed cell maintains its own <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> integrity.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The engulfed material typically fuses with lysosomes for digestion.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is seen in <span class=\"customMeta\" data-dictid=\"c0c247b89916927771948bc5e6d39c\">pathological</span> conditions such as <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> diseases, <span class=\"customMeta\" data-dictid=\"42937950901692777191ff3611c9ae\">lymphoproliferative</span> disorders, or histiocytic disorders.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is a <span class=\"customMeta\" data-dictid=\"6c2c85ae6b16927771950809419a59\">physiological</span> process essential for tissue <span class=\"customMeta\" data-dictid=\"50796581771692777189251fbe5ef1\">homeostasis</span> and immune defence.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/mIur8RIWznKjKuLrungx1749026473.mp3", "video": ""}, {"text": "A 45-year-old male complains of painless bilateral cervical lymphadenopathy for the past six months. Biopsy of a lymph node reveals sheets of large histiocytes with emperipolesis, surrounded by lymphocytes and plasma cells. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Hodgkin lymphoma", "correct": false}, {"label": "B", "text": "Sarcoidosis", "correct": false}, {"label": "C", "text": "Infectious mononucleosis", "correct": false}, {"label": "D", "text": "Rosai-Dorfman disease", "correct": true}], "correct_answer": "D. Rosai-Dorfman disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Qgbpt5iz6ATh5ruP2pmd1737520083.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/laEWQDeuZucLGSOaDPdD1749026118.mp3", "video": ""}, {"text": "Which of the following statements regarding neutrophil extracellular traps (NETs) is incorrect?", "options": [{"label": "A", "text": "NETs are formed in response to infectious pathogens and inflammatory mediators.", "correct": false}, {"label": "B", "text": "NETs consist of nuclear chromatin and granule proteins like antimicrobial peptides and enzymes.", "correct": false}, {"label": "C", "text": "NET formation is initiated by the release of histones from activated neutrophils.", "correct": false}, {"label": "D", "text": "NETs directly phagocytose the invading pathogens.", "correct": true}], "correct_answer": "D. NETs directly phagocytose the invading pathogens.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/oG4jH32GTd5KgSg5Ort61737519938.png", "https://image.prepladder.com/content/3PmBzM9jXJNauNGgcQ0S1737519906.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/qyJiWXhxxqKrhkYVnlPZ1749025878.mp3", "video": ""}, {"text": "A 40-year-old male presents with recurrent bacterial infections. Laboratory tests reveal reduced opsonization activity in his serum. Which of the following processes is primarily affected in this patient?", "options": [{"label": "A", "text": "Complement activation", "correct": false}, {"label": "B", "text": "Diapedesis", "correct": false}, {"label": "C", "text": "Microbial engulfment", "correct": true}, {"label": "D", "text": "Leucocyte rolling.", "correct": false}], "correct_answer": "C. Microbial engulfment", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/PZeMp3U8RgjZjHTBFZIe1737519848.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/62mnVAljrXCFz93pOq9L1739974284.mp3", "video": ""}, {"text": "Which among the following is a cardinal sign of inflammation?", "options": [{"label": "A", "text": "Prolonged fever", "correct": false}, {"label": "B", "text": "Tissue scarring", "correct": false}, {"label": "C", "text": "Abrasions", "correct": false}, {"label": "D", "text": "Redness", "correct": true}], "correct_answer": "D. Redness", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2Z3DNrc3aECbJtfnopec1749021698.mp3", "video": ""}, {"text": "Which of the following plays a crucial role in mediating firm adhesion of leukocytes during acute inflammation?", "options": [{"label": "A", "text": "CD11a/CD18", "correct": true}, {"label": "B", "text": "PECAM 1", "correct": false}, {"label": "C", "text": "CD31", "correct": false}, {"label": "D", "text": "CD44", "correct": false}], "correct_answer": "A. CD11a/CD18", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tkMXkGRL39qeyjZdUxQS1737515709.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/6TbZD5P9L3Iqbdg9jfk41739971041.mp3", "video": ""}, {"text": "A patient presents with fluid accumulation in the pleural cavity. Which of the following characteristics would be consistent with a diagnosis of exudate rather than a transudate?", "options": [{"label": "A", "text": "High LDH", "correct": true}, {"label": "B", "text": "Low protein concentration", "correct": false}, {"label": "C", "text": "Presence of mainly albumin", "correct": false}, {"label": "D", "text": "Low specific gravity", "correct": false}], "correct_answer": "A. High LDH", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/jLlTohs81bZCyHyCQWdW1737515584.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:701px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Transudate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Exudate</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mechanism</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ultra <span class=\"customMeta\" data-dictid=\"92ab6958db169277720297c18cd6ab\">filtrate</span> of <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> due to increased <span class=\"customMeta\" data-dictid=\"20b745c46c1692777189374f036950\">hydrostatic</span> pressure with normal <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> <span class=\"customMeta\" data-dictid=\"1c7103a9b516927771955682b6aaa4\">permeability</span> (non-inflammatory process).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Inflammatory process with increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clear, <span class=\"customMeta\" data-dictid=\"3963a2e0fa169277719874304f5705\">serous</span> fluid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cloudy/purulent/hemorrhagic</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Specific gravity</strong><br/>\n<strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low (<1.018)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High (>1.018)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Protein </strong><br/>\n<strong>(Option B, C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low (<2g/dl), mainly albumin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High (>2g/dl)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clot</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present (Due to high <span class=\"customMeta\" data-dictid=\"a137b7092a16927772025412d4ef05\">fibrinogen</span> level)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cell count</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types of cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Few lymphocytes and mesothelial cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neutrophils in <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> and lymphocytes in chronic inflammation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bacteria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>LDH </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Seen in</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:284px\">\n<ul>\n<li>Congestive <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> failure</li>\n<li>Cirrhosis</li>\n<li>Nephrotic Syndrome</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:303px\">\n<ul>\n<li>Pyogenic infections</li>\n<li>Malignancy</li>\n<li>Pancreatitis</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/w99rchXjswNSdlpK1yTr1739970753.mp3", "video": ""}, {"text": "Which of the following is considered the hallmark event of acute inflammation?", "options": [{"label": "A", "text": "Vasodilation", "correct": false}, {"label": "B", "text": "Increased vascular permeability", "correct": true}, {"label": "C", "text": "Stasis", "correct": false}, {"label": "D", "text": "Leukocyte extravasation", "correct": false}], "correct_answer": "B. Increased vascular permeability", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ySxnsbbW08lrihwJziLm1737957600.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Vascular events -> <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">Cellular</span> events</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Transient vasoconstriction.</li>\n<li>Vasodilation.</li>\n<li>Increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability.</li>\n<li>Stasis.</li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Margination.</li>\n<li>Rolling.</li>\n<li>Adhesion.</li>\n<li>Transmigration.</li>\n<li>Chemotaxis.</li>\n<li>Opsonization.</li>\n<li>Phagocytosis.</li>\n</ol>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/feH7nX3038Cp7uyEjVky1739970346.mp3", "video": ""}, {"text": "Which of the following mechanisms primarily contributed to the increased vascular permeability in this patient's with a right knee injury after fall from stairs?", "options": [{"label": "A", "text": "Contraction of endothelial cells resulting in the opening of interendothelial gaps", "correct": true}, {"label": "B", "text": "Direct damage to endothelial cells", "correct": false}, {"label": "C", "text": "Neutrophil-mediated injury to the endothelium", "correct": false}, {"label": "D", "text": "Proliferation of lymphatic vessels", "correct": false}], "correct_answer": "A. Contraction of endothelial cells resulting in the opening of interendothelial gaps", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Dy7F7HINA67DxZiw1rTQ1737515406.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/dAAko7tIEOVeanJFWF9O1739970185.mp3", "video": ""}, {"text": "A 30-year-old male presents to the emergency department with sudden onset right lower abdominal pain, accompanied by nausea and fever. On examination, there is tenderness over McBurney's point, and rebound tenderness is noted. Laboratory investigations reveal leukocytosis. Which type of inflammation is most likely to be associated with the following clinical scenario?", "options": [{"label": "A", "text": "Serous inflammation", "correct": false}, {"label": "B", "text": "Fibrinous inflammation", "correct": false}, {"label": "C", "text": "Purulent inflammation", "correct": true}, {"label": "D", "text": "Ulcerative inflammation", "correct": false}], "correct_answer": "C. Purulent inflammation", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/3NGKuFTuFzlQ7qkJTeY51737515329.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/uNQOfjr2jQYkuMWwKepz1739967641.mp3", "video": ""}, {"text": "Which of the following features is a characteristic of acute inflammation?", "options": [{"label": "A", "text": "Presence of granulomas", "correct": false}, {"label": "B", "text": "Proliferation of fibroblasts and angiogenesis", "correct": false}, {"label": "C", "text": "The predominance of lymphocytes in the inflammatory infiltrate", "correct": false}, {"label": "D", "text": "Accumulation of neutrophils at the site of injury", "correct": true}], "correct_answer": "D. Accumulation of neutrophils at the site of injury", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:630px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic Inflammation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Causative agent</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pathogen, injured tissues</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Persistent <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> due to <span class=\"customMeta\" data-dictid=\"9996ef505516927771937fe4ef1222\">non</span> degradable pathogens, persistent foreign bodies, or <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> reactions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells infiltrated</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neutrophils/Polymorphonuclear cells (PMN).</p>\n\t\t\t \n\n\t\t\t<p>Exception: <span class=\"customMeta\" data-dictid=\"f2f6f9068216927772016cacf26183\">Typhoid</span> (Relative Lymphocytosis)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphocytes, macrophages, and <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells</p>\n\t\t\t \n\n\t\t\t<p>Exception: Chronic</p>\n<p>Pseudomonas (it shows <span class=\"customMeta\" data-dictid=\"47d4b14d841692777195ec9f299139\">persistence</span> of Neutrophils)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary mediators</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vasoactive amines, eicosanoids</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IFN-y and other cytokines, growth factors, <span class=\"customMeta\" data-dictid=\"092583d1b41692777197a506409267\">reactive</span> oxygen species, <span class=\"customMeta\" data-dictid=\"310799d8981692777189d3a272674d\">hydrolytic</span> enzymes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Delayed</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Duration</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Few days</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Up to many months or years</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Outcomes</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Resolution , <span class=\"customMeta\" data-dictid=\"5618681fbe16927771804370383aaa\">abscess</span> formation, chronic inflammation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tissue destruction, fibrosis</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ajCq59alJjS0HdxDgXc01739966906.mp3", "video": ""}, {"text": "A 30-year-old female presents with a history of recent major surgery, deep vein thrombosis (DVT) in the lower extremities, and a family history of thrombotic events. Which of the following components constitute Virchow's triad, predisposing individuals to thrombosis?", "options": [{"label": "A", "text": "Endothelial injury, hypercoagulability, and venous stasis", "correct": true}, {"label": "B", "text": "Endothelial dysfunction, leukocytosis, and platelet activation", "correct": false}, {"label": "C", "text": "Arterial dilation, decreased platelet count, and fibrinolysis", "correct": false}, {"label": "D", "text": "Hypothermia, acidosis, and coagulopathy", "correct": false}], "correct_answer": "A. Endothelial injury, hypercoagulability, and venous stasis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2nDtOiHY6ccqkq3HfM7l1739964692.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 27 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Match the following tissue macrophages with respective organs: 1. Kupffer cells a) liver 2. Dust cells b) spleen 3. Hofbauer cells c) lung 4. Littoral cells d) placenta 5. Mesangial cells e) kidney", "options": [{"label": "A", "text": "1-b, 2-a, 3-d, 4-e, 5-c", "correct": false}, {"label": "B", "text": "1-a, 2-c, 3-d, 4-b, 5-e", "correct": true}, {"label": "C", "text": "1-a, 2-d, 3-e, 4-b, 5-c", "correct": false}, {"label": "D", "text": "1-c, 2-e, 3-b, 4-d, 5-a", "correct": false}], "correct_answer": "B. 1-a, 2-c, 3-d, 4-b, 5-e", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:504px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Name of the macrophage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tissue/ Organ</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microglia</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Brain</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dust cells or Alveolar Macrophages</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lungs</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Kuppffer cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Liver</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Littoral cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Spleen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mesangial cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Kidney</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hofbauer cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Placenta</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Osteoclasts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bone</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Type A synoviocyte</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Synovium</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Langerhans cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Skin</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Histiocytes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Connective tissue</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sinus histiocytes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymph nodes</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/akpDnBbPXDArSpaJKFrW1746683443.mp3", "video": ""}, {"text": "Which type of macrophages predominantly contributes to tissue repair and resolution of inflammation in patients with chronic obstructive pulmonary disease complicated by pneumonia?", "options": [{"label": "A", "text": "M1 macrophages", "correct": false}, {"label": "B", "text": "M2 macrophages", "correct": true}, {"label": "C", "text": "Both M1 and M2 macrophages", "correct": false}, {"label": "D", "text": "Resting macrophages", "correct": false}], "correct_answer": "B. M2 macrophages", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>M1 activation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>M2 activation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Also known as</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>“Classical <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> activation.”</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>“Alternative <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> activation.”</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stimulus for activation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Microbial products</li>\n</ul>\n<p> (e.g., endotoxin); TLRs (Toll-like receptor)</p>\n<ul>\n<li>T cell-derived signals</li>\n</ul>\n<p> (e.g., IFN-γ),</p>\n<ul>\n<li>Foreign substances</li>\n</ul>\n<p> (e.g., crystals).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>IL-4</li>\n<li>IL-13.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Releases</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reactive oxygen species (ROS), lysosomal enzymes, <span class=\"customMeta\" data-dictid=\"5536b77611169277719356d32e638a\">nitric</span> <span class=\"customMeta\" data-dictid=\"e08c004e8f1692777194c9d37e17ad\">oxide</span> (NO) and Pro-inflammatory cytokines</p>\n<ul>\n<li>TNF-α</li>\n<li>IL-1; IL-12; IL-23</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anti-inflammatory cytokines</p>\n<ul>\n<li>IL-10</li>\n<li>TGF-β</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Function</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microbicidal destroys pathogens and amplifies inflammation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Terminates the <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and promotes tissue repair (fibrosis).</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ZYOPp5Vivk8r0jPZAMIC1746683587.mp3", "video": ""}, {"text": "Which of the following statements about granulomas is incorrect?", "options": [{"label": "A", "text": "Granuloma formation is a Type IV hypersensitivity reaction", "correct": false}, {"label": "B", "text": "IFN gamma is an important cytokine involved in the process", "correct": false}, {"label": "C", "text": "CD8+ is the type of T lymphocytes involved in this process", "correct": true}, {"label": "D", "text": "Epitheloid cells in granuloma are modified macrophages", "correct": false}], "correct_answer": "C. CD8+ is the type of T lymphocytes involved in this process", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Uk3cQJ3BLVBkUZYziZL51746683742.mp3", "video": ""}, {"text": "Which sequence accurately identifies lymphocytes, epithelioid cells, Langhans giant cells, and caseous necrosis in the image given below?", "options": [{"label": "A", "text": "b, d, a, c", "correct": false}, {"label": "B", "text": "d, b, a, c", "correct": false}, {"label": "C", "text": "d, b, c, a", "correct": true}, {"label": "D", "text": "b, d, c, a", "correct": false}], "correct_answer": "C. d, b, c, a", "question_images": ["https://image.prepladder.com/notes/i3LxSC2scgrvUwUaxOek1742966296.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ngBGOE7mD3RzwOY5nXUI1746683947.mp3", "video": ""}, {"text": "A 40-year-old woman presents with a persistent dry cough, shortness of breath, and bilateral enlargement of the lymph nodes in her chest, incidentally detected on a routine chest X-ray given below. Physical examination reveals fine crackles in her lung bases. Pulmonary function tests show reduced lung volumes and a decreased diffusion capacity for carbon monoxide. Which type of granuloma is commonly associated with the histopathological findings in this patient?", "options": [{"label": "A", "text": "Naked granuloma", "correct": true}, {"label": "B", "text": "Stellate granuloma", "correct": false}, {"label": "C", "text": "Eosinophilic granuloma", "correct": false}, {"label": "D", "text": "Durck granuloma", "correct": false}], "correct_answer": "A. Naked granuloma", "question_images": ["https://image.prepladder.com/content/v8ADWoAGHsN8vzuwdILZ1737513396.png"], "explanation_images": ["https://image.prepladder.com/content/y1uPgEGjiLoQ7xYK99Uj1737513421.png", "https://image.prepladder.com/content/AQUJvHKOIgu3yEbH4J7L1737513510.png", "https://image.prepladder.com/content/8AMB3Xz5uwBoeMiHnVXa1737513540.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Infectious causes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-infectious causes</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>TB (Caseating and non-caseating granuloma)</li>\n<li>Leprosy</li>\n<li>Syphilis</li>\n<li>Malaria (Durck granuloma)</li>\n<li>Cat-scratch disease and <span class=\"customMeta\" data-dictid=\"1df59c006c1692777191996da1b3f0\">Lymphogranuloma</span> venerum (Stellate granuloma)</li>\n<li>Q fever (Doughnut granuloma/ Fibrin ring granuloma)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Sarcoidosis (Naked granuloma)</li>\n<li>Giant cell arteritis</li>\n<li>Crohn’s disease</li>\n<li>Churg-Strauss syndrome (Eosinophilic granuloma)</li>\n<li>Berylliosis (Foreign body granuloma)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/RM0oJrjqryNLDufPpZ8l1746684363.mp3", "video": ""}, {"text": "Which of the following is not a physiological giant cell?", "options": [{"label": "A", "text": "Osteoclast", "correct": false}, {"label": "B", "text": "Syncytiotrophoblast", "correct": false}, {"label": "C", "text": "Megakaryocytes", "correct": false}, {"label": "D", "text": "Langhans cells", "correct": true}], "correct_answer": "D. Langhans cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/UOhegxXN0jYZ7CnAXJZG1737513625.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/rX7uX9MT1cMRCHoE6Yai1746684570.mp3", "video": ""}, {"text": "A 45-year-old male presents with a persistent subcutaneous nodule on his forearm. Biopsy reveals the presence of multinucleated giant cells within the lesion, as shown in the accompanying HPE image. Further analysis indicates a central zone of lipid-laden macrophages surrounded by a wreath-like arrangement of nuclei. Which type of giant cell is most likely to be observed in this scenario?", "options": [{"label": "A", "text": "Touton giant cells", "correct": true}, {"label": "B", "text": "Reed-Sternberg Cells", "correct": false}, {"label": "C", "text": "Warthin-Finkeldey giant cells", "correct": false}, {"label": "D", "text": "Foreign body giant cells", "correct": false}], "correct_answer": "A. Touton giant cells", "question_images": ["https://image.prepladder.com/content/HhJo5ZrMPaA8riQIGmTC1737513784.png"], "explanation_images": ["https://image.prepladder.com/content/Vd2yQO4KnVOrwHLI7wnx1737513793.png", "https://image.prepladder.com/content/aCnYXhBeIMK43Mbs76Je1737513830.png", "https://image.prepladder.com/content/odwOMo0IvdtemWKjIr1v1737513861.png", "https://image.prepladder.com/content/0S33SuOnoeE2MDxUo7FM1737513888.png", "https://image.prepladder.com/content/ECQGZvCawSvo2huLNozG1737513913.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:619px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Giant Cell Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Seen in</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Touton Giant Cells</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"https://commons.wikimedia.org/wiki/User:Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Granulation_tissue_containg_a_poorly_formed_granuloma_with_a_Langhan%27s_giant_cell.jpg?uselang=en#Licensing\" data-tags=\"\" height=\"1474\" src=\"https://image.prepladder.com/content/Vd2yQO4KnVOrwHLI7wnx1737513793.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Multinucleated giant cells with a central zone of lipid-laden Macrophages are surrounded by a wreath-like arrangement of nuclei.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Xanthogranuloma, xanthoma, fat necrosis</p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reed-Sternberg Cells (Option B)</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Ed Uthman, MD\" data-hash=\"\" data-license=\"CC-BY-SA 2.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Hodgkin_Disease,_Reed-Sternberg_Cell.jpg\" data-tags=\"\" height=\"1324\" src=\"https://image.prepladder.com/content/aCnYXhBeIMK43Mbs76Je1737513830.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large, binucleated or <span class=\"customMeta\" data-dictid=\"aa085932ce1692777193be7e5198bf\">multinucleated</span> cells with prominent nucleoli, often with an \"owl's eye\" appearance (pink nucleoli)</p>\n<p>(RS cells- also seen in DLBCL, owl’s eye appearance- also seen in <span class=\"customMeta\" data-dictid=\"b40fd910b51692777184ed47a00541\">CMV</span> infection)</p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hodgkin lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Warthin-Finkeldey Giant Cells</strong><br/>\n<strong>(Option C)</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Wyplosz, Benjamin & Lafarge, Marion & Escaut, Lélia & Stern, Jean baptiste.\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/Transbronchic-biopsies-showing-multigiant-cells-with-viral-intranuclear-eosinophilic_fig1_257534604\" data-tags=\"\" height=\"1410\" src=\"https://image.prepladder.com/content/odwOMo0IvdtemWKjIr1v1737513861.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large, <span class=\"customMeta\" data-dictid=\"aa085932ce1692777193be7e5198bf\">multinucleated</span> cells with irregularly distributed <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and a foamy cytoplasm. May contain <span class=\"customMeta\" data-dictid=\"9a24821bc91692777190bba334f1a6\">intranuclear</span> and <span class=\"customMeta\" data-dictid=\"45e0bd1529169277719054d85830ce\">intracytoplasmic</span> <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> inclusions.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Measles (Rubeola) infection</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Langhans Giant Cells</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Haymanj\" data-hash=\"\" data-license=\"NA\" data-source=\"https://commons.wikimedia.org/wiki/File:Granulation_tissue_containg_a_poorly_formed_granuloma_with_a_Langhan%27s_giant_cell.jpg?uselang=en#Licensing\" data-tags=\"\" height=\"1691\" src=\"https://image.prepladder.com/content/0S33SuOnoeE2MDxUo7FM1737513888.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Multinucleated giant cells with <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> arranged peripherally in a horseshoe-like or semicircular pattern.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tuberculosis, Sarcoidosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Foreign Body Giant Cells</strong></p>\n<p><strong>(Option D)</strong></p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Deoti, Beatriz & Silva, Alcino & Costa, Maria & Dinali, Aline\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.researchgate.net/figure/Giant-cell-reaction-to-foreign-body-at-serosa-Multinuclear-cell-with-a-fagocyted-foreign_fig5_5303908\" data-tags=\"\" height=\"1637\" src=\"https://image.prepladder.com/content/ECQGZvCawSvo2huLNozG1737513913.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large, <span class=\"customMeta\" data-dictid=\"aa085932ce1692777193be7e5198bf\">multinucleated</span> cells with multiple <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> arranged haphazardly.</p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Foreign bodies in tissues like talc, sutures, or crystals</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/AoJ3ykjBPVkVNpkJR1Y61746691786.mp3", "video": ""}, {"text": "A 45-year-old woman undergoes a routine elective surgery for the removal of a benign skin lesion on her forearm. The procedure involves making a small incision, excising the lesion, and closing the wound with sutures. Which of the following statements accurately describes wound healing by primary intention in this scenario?", "options": [{"label": "A", "text": "Myofibroblasts play a significant role in wound contraction.", "correct": false}, {"label": "B", "text": "The wound is associated with large tissue deficits.", "correct": false}, {"label": "C", "text": "Granulation tissue formation is extensive.", "correct": false}, {"label": "D", "text": "The wound is expected to heal with minimal inflammatory response.", "correct": true}], "correct_answer": "D. The wound is expected to heal with minimal inflammatory response.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/dyXgkwcTmpbuNYunhpBi1737513987.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary intention</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Secondary intention</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Primary intention <span class=\"customMeta\" data-dictid=\"9cf83937931692777188a014337dcf\">healing</span> involves rapid <span class=\"customMeta\" data-dictid=\"2b4569285f1692777184282b1ca3f1\">closure</span> of a clean, surgically closed wound with minimal tissue loss, resulting in a small scar.</p>\n<p>e.g.Surgical scar.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Secondary intention <span class=\"customMeta\" data-dictid=\"9cf83937931692777188a014337dcf\">healing</span> occurs when a wound is left open to granulate and epithelialise, often resulting in a larger <span class=\"customMeta\" data-dictid=\"561a199cce1692777198225706434c\">scar</span> and longer <span class=\"customMeta\" data-dictid=\"9cf83937931692777188a014337dcf\">healing</span> time.</li>\n<li>Associated with wound contraction.</li>\n</ul>\n<p>e.g. Road traffic accidents.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/RWypWm7yych5EDW8MWh51746692038.mp3", "video": ""}, {"text": "A 30-year-old man presents to the clinic with a raised scar on his chest. He reports that the scar has been gradually increasing in size since he had a minor injury in that area about a year ago. On examination, the scar extends beyond the original wound margins and appears firm and raised. Which of the following is the most likely diagnosis for the scar on the patient's chest?", "options": [{"label": "A", "text": "Hypertrophic scar", "correct": false}, {"label": "B", "text": "Keloid", "correct": true}, {"label": "C", "text": "Exuberant granulation tissue", "correct": false}, {"label": "D", "text": "Contracture", "correct": false}], "correct_answer": "B. Keloid", "question_images": ["https://image.prepladder.com/content/AAL4VaeQZmgX7cxS5BlP1737514086.png"], "explanation_images": ["https://image.prepladder.com/content/1NGHToLO4bVVPSroFLhw1737514137.png", "https://image.prepladder.com/content/8KiWHYjQ2GlAvetr3vB41737514169.png", "https://image.prepladder.com/content/rKRZ2TJm9tqaSEwXT2vz1737514186.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/LrO4ePOpktWZ8XaVs9Js1746692303.mp3", "video": ""}, {"text": "Which of the following cell types is classified as stable cells in terms of their proliferative capacity and turnover rate?", "options": [{"label": "A", "text": "Neurons in the brain", "correct": false}, {"label": "B", "text": "Hematopoietic cells in bone marrow", "correct": false}, {"label": "C", "text": "Stratified squamous epithelia of the skin", "correct": false}, {"label": "D", "text": "Endothelial cells in blood vessels", "correct": true}], "correct_answer": "D. Endothelial cells in blood vessels", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:636px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Labile cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stable cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Permanent cells</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>These cells are continuously being lost and replaced by <span class=\"customMeta\" data-dictid=\"76948f718016927771924774ade7e9\">maturation</span> from tissue stem cells and by the <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> cells.</li>\n<li>Labile cells include <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">hematopoietic</span> cells in the <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> <strong>(Option B)</strong> and the majority of surface <span class=\"customMeta\" data-dictid=\"d34d065dda1692777187d1aca78b88\">epithelia</span> <strong>(Option C)</strong></li>\n</ul>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>They are quiescent and have minimal proliferative activity from progenitor cells.</li>\n<li>They divide only when required but limited <span class=\"customMeta\" data-dictid=\"91229d427e169277719753f25af9f0\">regeneration</span> compared to <span class=\"customMeta\" data-dictid=\"ccff55377d16927771919dd7f8a964\">labile</span> cells.</li>\n<li>Stable cells constitute the <span class=\"customMeta\" data-dictid=\"e46d46c1521692777194d02f11f83b\">parenchyma</span> of most solid tissues(liver), endothelial cells <strong>(Option D)</strong>, fibroblasts, and smooth muscle cells.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<ul>\n<li>These cells are considered to be terminally differentiated and nonproliferative in <span class=\"customMeta\" data-dictid=\"ba016f80c31692777196b151e95b8f\">postnatal</span> life.</li>\n<li>Permanent cells include Neurons <strong>(Option A)</strong> and <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> and skeletal muscle cells.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man undergoes a minor surgical procedure to remove a small skin lesion from his forearm, and the wound is meticulously closed with sutures. Three days after the surgery, he comes to the OPD for review. Which event of the wound healing process is typically observed in this patient?", "options": [{"label": "A", "text": "Platelet and fibrin clot formation", "correct": false}, {"label": "B", "text": "Neutrophils start to accumulate", "correct": false}, {"label": "C", "text": "Replacement of neutrophils by macrophages", "correct": true}, {"label": "D", "text": "Collagen bridging initiation", "correct": false}], "correct_answer": "C. Replacement of neutrophils by macrophages", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:583px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>DAY</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>EVENTS</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DAY 0</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Platelets and Fibrin <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> blood clots. <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DAY 1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> remains and <span class=\"customMeta\" data-dictid=\"9bb62ce0f71692777197fcc2b5f29c\">recruitment</span> of neutrophils (acute inflammation). <strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DAY 2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood clots remain; neutrophils accumulate followed by thin epithelial layer formation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DAY 3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> sets in, and macrophages replace neutrophils. <strong>(Option C)</strong></p>\n<p>Granulation tissue begins (blood vessel formation starts)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DAY 5</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Maximum <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue (Maximum neovascularization)</li>\n<li>Collagen <span class=\"customMeta\" data-dictid=\"ec4db08de51692777183e82739c83d\">bridging</span> starts<strong> (Option D)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DAY 21(3RD WEEK)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Maximum <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition (Type I collagen.)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/UgrgVWTOdDYcuE7oXduG1746793162.mp3", "video": ""}, {"text": "Which of the following statements regarding wound healing is true?", "options": [{"label": "A", "text": "The wound regains 20% of its normal strength by 1 week.", "correct": false}, {"label": "B", "text": "The wound regains 70-80% of its normal strength by 12 weeks.", "correct": true}, {"label": "C", "text": "The wound regains its original strength eventually.", "correct": false}, {"label": "D", "text": "The initial collagen formed in the process of wound healing is Type-1 collagen.", "correct": false}], "correct_answer": "B. The wound regains 70-80% of its normal strength by 12 weeks.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/48f8jJBg7vAZtP1tM1Vt1746793551.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 25-year-old female presents to the emergency department with severe allergic reaction symptoms, including urticaria and hypotension, after ingesting a shrimp. How does the vasoactive mediator involved primarily cause hypotension?", "options": [{"label": "A", "text": "Dilating arterioles and increasing vascular permeability", "correct": true}, {"label": "B", "text": "Enhancing nitric oxide production and vasodilation", "correct": false}, {"label": "C", "text": "Inducing the release of other pro-inflammatory cytokines", "correct": false}, {"label": "D", "text": "Inhibiting platelet aggregation and causing clotting", "correct": false}], "correct_answer": "A. Dilating arterioles and increasing vascular permeability", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/39TNv9dfb5YMWY7k8F3i1737511417.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/As6w1A4aGvkMtEgglxkC1746794248.mp3", "video": ""}, {"text": "Which type of nitric oxide synthase (NOS) is involved in microbial killing and is induced in macrophages by cytokines or microbial products?", "options": [{"label": "A", "text": "Endothelial NOS (eNOS)", "correct": false}, {"label": "B", "text": "Neuronal NOS (nNOS)", "correct": false}, {"label": "C", "text": "Inducible NOS (iNOS)", "correct": true}, {"label": "D", "text": "None of the above", "correct": false}], "correct_answer": "C. Inducible NOS (iNOS)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:551px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Constitutive Expression</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Function</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Endothelial (eNOS)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low levels</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Maintains <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> tone</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Neuronal (nNOS)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low levels</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Functions as a neurotransmitter</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inducible (iNOS)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Induced in macrophages(not <span class=\"customMeta\" data-dictid=\"ab1c99888b16927771857bdf876f02\">constitutive</span> expression)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involved in <span class=\"customMeta\" data-dictid=\"04f4b6dbf71692777192ca0c4f70fa\">microbial</span> killing, <span class=\"customMeta\" data-dictid=\"f3063c1d8b169277719018bf869980\">induced</span> by cytokines or <span class=\"customMeta\" data-dictid=\"04f4b6dbf71692777192ca0c4f70fa\">microbial</span> products</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/e52tmJ6ISaGyDKjV82ku1746794408.mp3", "video": ""}, {"text": "All are chemoattractants among the following except :", "options": [{"label": "A", "text": "IL-8", "correct": false}, {"label": "B", "text": "C5a", "correct": false}, {"label": "C", "text": "LTB4", "correct": false}, {"label": "D", "text": "C3b", "correct": true}], "correct_answer": "D. C3b", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>EXOGENOUS </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ENDOGENOUS</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Exogenous factors are:</p>\n<p>Bacterial products, including peptides with <strong>N-formylmethionine <span class=\"customMeta\" data-dictid=\"16b76d1d1c1692777200240efcb0e2\">terminal</span> <span class=\"customMeta\" data-dictid=\"543f207eb51692777181723491a358\">amino</span> acids </strong>and some lipids.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endogenous chemoattractants include: Several chemical mediators</p>\n<p>(1) cytokines, particularly those of the <span class=\"customMeta\" data-dictid=\"809599d0241692777184db8a8f9935\">chemokine</span> family (e.g., <strong>IL-8</strong>);</p>\n<p>(2) components of the <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> system, particularly <strong>C5a</strong>; and</p>\n<p>(3) <span class=\"customMeta\" data-dictid=\"403abe852c169277718297dd131d29\">arachidonic acid</span> (AA) metabolites, mainly <span class=\"customMeta\" data-dictid=\"5a4fd169911692777191c1cb27b0d7\">leukotriene</span> B4 (<strong>LTB4</strong>).</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/n468dMxVl5FDKzFYmZrK1746794581.mp3", "video": ""}, {"text": "A 30-year-old male presents with symptoms of flu-like illness, including fever, sore throat, and fatigue. Further investigation reveals a positive HIV serology. Which of the following chemokine receptors primarily facilitates the entry of HIV into CD4+ T cells?", "options": [{"label": "A", "text": "CX3CL1", "correct": false}, {"label": "B", "text": "CCR5 , CXCR4", "correct": true}, {"label": "C", "text": "CCL11 , MCP-1", "correct": false}, {"label": "D", "text": "CXCL8", "correct": false}], "correct_answer": "B. CCR5 , CXCR4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tqCjpPHVIjNLhbah7MAC1737511576.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/5imA2QGN2xgY8Jpa6d0V1746794733.mp3", "video": ""}, {"text": "A 35-year-old male presents with a history of chronic obstructive pulmonary disease (COPD) exacerbation. Which of the following chemokines is primarily responsible for recruiting neutrophils to the airways in COPD exacerbations?", "options": [{"label": "A", "text": "IL-8", "correct": true}, {"label": "B", "text": "MCP-1", "correct": false}, {"label": "C", "text": "SDF-1", "correct": false}, {"label": "D", "text": "RANTES", "correct": false}], "correct_answer": "A. IL-8", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/b2FmoQqFxJvdzwWet3Zu1746795146.mp3", "video": ""}, {"text": "Which of the following mediators is responsible for cancer cachexia?", "options": [{"label": "A", "text": "TNF-alpha", "correct": true}, {"label": "B", "text": "IFN-gamma", "correct": false}, {"label": "C", "text": "IL-8", "correct": false}, {"label": "D", "text": "TGF-beta", "correct": false}], "correct_answer": "A. TNF-alpha", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/mXn0mCBWunzv4AaC2bQy1746795309.mp3", "video": ""}, {"text": "A 20-year-old male is prescribed naproxen for a musculoskeletal injury. What is naproxen’s mechanism of action?", "options": [{"label": "A", "text": "Lipoxygenase inhibition", "correct": false}, {"label": "B", "text": "COX-2 inhibition", "correct": false}, {"label": "C", "text": "Cycloxygenase (COX) 1 and COX-2 inhibition", "correct": true}, {"label": "D", "text": "Prostaglandin (PG) F2 inhibition", "correct": false}], "correct_answer": "C. Cycloxygenase (COX) 1 and COX-2 inhibition", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Q3P0iVidVwl14XXwDarE1746795465.mp3", "video": ""}, {"text": "Select the correct statements about the complement system. 1) The complement system primarily functions by adaptive immunity. 2) Complement proteins are solely produced in the liver. 3) All complement proteins are synthesized in inactive forms and are activated by proteolysis. 4) Complement activation occurs through three pathways. 5) Complements have two equal fragments.", "options": [{"label": "A", "text": "1,2,3", "correct": false}, {"label": "B", "text": "2,4", "correct": false}, {"label": "C", "text": "2,3,5", "correct": false}, {"label": "D", "text": "3,4", "correct": true}], "correct_answer": "D. 3,4", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/0hNoAxiHK0inEoC3FzU81746795703.mp3", "video": ""}, {"text": "A 45-year-old male presents to the clinic with a high fever, chills, and malaise. He reports feeling unwell for the past few days and has noticed redness and swelling around a cut on his forearm. On examination, the healthcare provider observes a localized area of erythema and induration at the site of the wound. Which of the following events is a crucial step in the activation of the complement system in response to the patient's initial condition?", "options": [{"label": "A", "text": "Binding of C1q to antigen-antibody complexes", "correct": false}, {"label": "B", "text": "Formation of membrane attack complex", "correct": false}, {"label": "C", "text": "Cleavage of C3 into C3a and C3b", "correct": true}, {"label": "D", "text": "Cleavage of C5 by C5 convertase", "correct": false}], "correct_answer": "C. Cleavage of C3 into C3a and C3b", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/DCjwuGg0rARfFpNNAp391737511862.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Classical pathway</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Triggered by the binding of C1 to an <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> (IgM or IgG) that has combined with the antigen. <strong>Activated by Ag-Ab complex.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alternate pathway</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Triggered by <span class=\"customMeta\" data-dictid=\"04f4b6dbf71692777192ca0c4f70fa\">microbial</span> surface molecules (e.g., <span class=\"customMeta\" data-dictid=\"02a163ec2d1692777187350972be3e\">endotoxin</span> or <span class=\"customMeta\" data-dictid=\"dccbe517c116927771914669149423\">lipopolysaccharide</span> [LPS]), complex polysaccharides, <span class=\"customMeta\" data-dictid=\"862ec4693f16927771844445d898b3\">cobra</span> venom, and other substances in the <strong>absence of an antibody.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lectin pathway</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> mannose-binding <span class=\"customMeta\" data-dictid=\"32850def99169277719135597fc165\">lectin</span> binds to carbohydrates on microbes and directly activates C1.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Y1pOQDPEa1xjrfSYvjif1746795905.mp3", "video": ""}, {"text": "Match the following with their correct answers. 1 C3a i Decay accelerating factor 2 C3b ii EBV receptor 3 CR2 iii Anaphylatoxin 4 CD55 iv Opsonin", "options": [{"label": "A", "text": "1-iii, 2-iv, 3-ii, 4-i", "correct": true}, {"label": "B", "text": "1-iii, 2-iv, 3-i, 4-ii", "correct": false}, {"label": "C", "text": "1-iv, 2-iii, 3-i, 4-ii", "correct": false}, {"label": "D", "text": "1-iv, 2-iii, 3-ii, 4-i", "correct": false}], "correct_answer": "A. 1-iii, 2-iv, 3-ii, 4-i", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/oQmqED5zCuEkXHU34Nyx1745330854.mp3", "video": ""}, {"text": "Which of the following is false regarding the alternate complement pathway?", "options": [{"label": "A", "text": "Teichoic acid is an initiator of the alternate complement pathway.", "correct": false}, {"label": "B", "text": "The first complement protein to be activated is C1.", "correct": true}, {"label": "C", "text": "The C3 convertase of the alternate pathway is C3bBb.", "correct": false}, {"label": "D", "text": "Properdin deficiency involves the alternate pathway.", "correct": false}], "correct_answer": "B. The first complement protein to be activated is C1.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ucsL8QuED1WmK5coVRTJ1737511997.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathogens from microbes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-microbial initiators</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gram (-ve) bacteria: Endotoxins or lipopolysaccharides.</li>\n<li>Gram (+ve) bacteria: <strong>Teichoic acid. (Option A)</strong></li>\n<li>Fungal cells: <span class=\"customMeta\" data-dictid=\"3655d8847516927772026e1e299f2a\">Yeast</span> cells.</li>\n<li>Parasites: Trypanosoma.</li>\n<li>Virus-infected cells.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Human antibodies in complexes: IgA, IgD.</li>\n<li>Tumor cells.</li>\n<li>Cobra <span class=\"customMeta\" data-dictid=\"ce053080da169277720142dbefddb2\">venom</span> factor.</li>\n<li>Heterologous RBCs from mice, rabbits, and chickens.</li>\n<li>Anion <span class=\"customMeta\" data-dictid=\"54a162202216927771966d1ee34a74\">polymer</span> like <span class=\"customMeta\" data-dictid=\"b0cf19c27716927771864e8d371aa4\">dextran</span> sulfate.</li>\n<li>Pure carbohydrates like <span class=\"customMeta\" data-dictid=\"2c294889fb169277718046e4ef230c\">agar</span> and inulin.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Classical</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alternate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lectin</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Activator (initiator)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antigen-antibody complex</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Endotoxin, IgA, <span class=\"customMeta\" data-dictid=\"0880474f841692777189195318f57f\">IgD</span> etc</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Carbohydrate</p>\n<p>residue of the bacterial <span class=\"customMeta\" data-dictid=\"97294d26a21692777184b7ddc59c4e\">cell wall</span> (mannose-binding protein) that binds to the host <span class=\"customMeta\" data-dictid=\"32850def99169277719135597fc165\">lectin</span> antigen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1st <span class=\"customMeta\" data-dictid=\"f0ff39a3fa1692777184cf743ca1e7\">complement</span> to be activated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C3 <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C4</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C3 convertase</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C14b2a</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C3bBb <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MBL/MASP-C4b2a</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C5 <span class=\"customMeta\" data-dictid=\"ef908f59d316927771856834b1f30c\">convertase</span> (C3 <span class=\"customMeta\" data-dictid=\"ef908f59d316927771856834b1f30c\">convertase</span> + 3b)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C14b2a3b</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C3bBb3b</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MBL/MASP-C4b2a3b</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Complement levels in the serum</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>All C1-C9: Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C1, C2, C4: Normal</p>\n<p>Others: Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C1: Normal</p>\n<p>Others: Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immunity</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acquired</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Innate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Innate</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/vA7YKPN6dACZ0FG7m5Bz1747050253.mp3", "video": ""}, {"text": "A 25-year-old female presents to the emergency department with sudden-onset swelling of her face, lips, and tongue. She reports a history of similar episodes occurring intermittently since childhood, often triggered by stress or trauma. On examination, she appears anxious and has marked swelling of her lips and tongue, with difficulty speaking and swallowing. There are no signs of urticaria or pruritus. Her vital signs are stable. Which of the following deficiencies is seen in this condition?", "options": [{"label": "A", "text": "Deficiency of properdin", "correct": false}, {"label": "B", "text": "Deficiency of C1, C2, C3, C4", "correct": false}, {"label": "C", "text": "Deficiency of C1 esterase inhibitor", "correct": true}, {"label": "D", "text": "Deficiency of C5-C9", "correct": false}], "correct_answer": "C. Deficiency of C1 esterase inhibitor", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Complement deficiency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathway(s) involved</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease (pathology)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Properdin <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Alternative pathway</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"6ced8252211692777199ab0cc3f2bb\">susceptibility</span> to <span class=\"customMeta\" data-dictid=\"e26ba9a1d41692777187d0ad03a8c1\">encapsulated</span> organisms (Neisseria)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C1, C2, C3, C4 <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>C1, C2, C4- Classical pathway</li>\n<li>C3- Common pathway</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>SLE, glomerulonephritis, <span class=\"customMeta\" data-dictid=\"f6332ef2d21692777196294f154e57\">pyogenic</span> infections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C5-C9: <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">Membrane</span> attack complex <strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Common deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Disseminated <span class=\"customMeta\" data-dictid=\"a3acbdadb41692777193612b704230\">Neisseria</span> infection( <span class=\"customMeta\" data-dictid=\"f0347e3a7a1692777188cf90c50d6f\">gram</span> negative bacteria)</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/CSVB8S86AgJzopFlN5SV1746796205.mp3", "video": ""}, {"text": "Which of the following deficiencies is seen in paroxysmal nocturnal hemoglobinuria?", "options": [{"label": "A", "text": "C5-C9", "correct": false}, {"label": "B", "text": "CD59", "correct": true}, {"label": "C", "text": "C1", "correct": false}, {"label": "D", "text": "Factor H", "correct": false}], "correct_answer": "B. CD59", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/0luMWJ1Jyme51tn3e3581747050457.mp3", "video": ""}, {"text": "Pain during inflammation is mediated by?", "options": [{"label": "A", "text": "Serotonin", "correct": false}, {"label": "B", "text": "Leukotrienes", "correct": false}, {"label": "C", "text": "Interleukin-1", "correct": false}, {"label": "D", "text": "Bradykinin", "correct": true}], "correct_answer": "D. Bradykinin", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Serotonin)</strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Serotonin, also known as <strong>5-hydroxytryptamine (5-HT)</strong>, is a <span class=\"customMeta\" data-dictid=\"e28fd027b416927771932bc23ba0a5\">neurotransmitter</span> and <span class=\"customMeta\" data-dictid=\"1059a0d9031692777201a8d8debd5e\">vasoactive</span> substance produced primarily by <strong>enterochromaffin cells</strong> in the <span class=\"customMeta\" data-dictid=\"b3a647ce2516927771881427f56c1d\">gastrointestinal</span> tract.</li>\n<li>It regulates <strong>mood, appetite</strong>, and <strong>sleep</strong>, as well as <strong>gastrointestinal motility</strong> and <strong>platelet aggregation</strong>.</li>\n<li>In the context of inflammation, <span class=\"customMeta\" data-dictid=\"06eba971ce169277719884f8c62937\">serotonin</span> released from platelets and <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells can contribute to <strong>vasodilation</strong>, <strong>increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability,</strong> and <strong>smooth muscle</strong> <strong>contraction</strong>.</li>\n<li>Its role in <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> is <strong>less prominent</strong> compared to other mediators like <span class=\"customMeta\" data-dictid=\"b5d4ddbfe71692777189a12acd5502\">histamine</span> and bradykinin.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Leukotrienes)</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Leukotrienes are <strong>lipid mediators</strong> synthesized from <span class=\"customMeta\" data-dictid=\"403abe852c169277718297dd131d29\">arachidonic acid</span> metabolism, primarily by the <strong>5-lipoxygenase pathway.</strong></li>\n<li>They play a significant role in the <span class=\"customMeta\" data-dictid=\"715b4caf0316927771943797627d8d\">pathogenesis</span> of <span class=\"customMeta\" data-dictid=\"76891bb6e91692777182cda16e1db6\">asthma</span> and allergic reactions by inducing <strong>bronchoconstriction, increasing <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability</strong>, and <strong>promoting the <span class=\"customMeta\" data-dictid=\"9bb62ce0f71692777197fcc2b5f29c\">recruitment</span> of <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells</strong> to the site of inflammation.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>(Interleukin-1)</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Interleukin-1 (IL-1) is a <strong>proinflammatory</strong> <span class=\"customMeta\" data-dictid=\"0ac01cc0c31692777185cae5f28175\">cytokine</span> produced by various cells, including <strong>macrophages, monocytes</strong>, and <strong>dendritic cells</strong>, in response to infection, injury, or inflammation.</li>\n<li>It plays a central role in the <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> response by <strong>inducing fever, activating immune cells</strong>, and promoting the production of other cytokines and <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> mediators.</li>\n<li>However, IL-1 is not a primary <span class=\"customMeta\" data-dictid=\"a993f205b0169277719284faad4c87\">mediator</span> responsible for the <span class=\"customMeta\" data-dictid=\"8fb8df140b1692777191702bbc9358\">localized</span> symptoms described in the clinical scenario, including pain, swelling, erythema, and warmth following a <span class=\"customMeta\" data-dictid=\"18034e0517169277720002aaa66d36\">traumatic</span> injury.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/KJd7eY5rDwZuvnbNEVhZ1747051340.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "All of the following are correct about NETs except?", "options": [{"label": "A", "text": "May result in SLE", "correct": false}, {"label": "B", "text": "Phagocytosis", "correct": true}, {"label": "C", "text": "Sepsis", "correct": false}, {"label": "D", "text": "Arginine needed", "correct": false}], "correct_answer": "B. Phagocytosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/AKZhdLDMUahpRJY6RVWX1747305366.png", "https://image.prepladder.com/content/kpiVZqjsKIdoj8HrNLRJ1747305369.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Both intrinsic and extrinsic pathways are seen in :", "options": [{"label": "A", "text": "Apoptosis", "correct": true}, {"label": "B", "text": "Necrosis", "correct": false}, {"label": "C", "text": "Necroptosis", "correct": false}, {"label": "D", "text": "Pyroptosis", "correct": false}], "correct_answer": "A. Apoptosis", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A.\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 12-year-old child presented with 15 days of cough. On examination, cervical lymphadenopathy was noted, and the lymph node biopsy showed the following features. What is the most probable diagnosis?", "options": [{"label": "A", "text": "Tuberculosis", "correct": true}, {"label": "B", "text": "Leprosy", "correct": false}, {"label": "C", "text": "Sarcoidosis", "correct": false}, {"label": "D", "text": "Syphilis", "correct": false}], "correct_answer": "A. Tuberculosis", "question_images": ["https://image.prepladder.com/content/65eJsKvjG4lu7wy1DU1F1745220973.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:621px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Type of Granuloma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:bottom\">\n<p><strong>Examples</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Caseating Granuloma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Tuberculosis, Histoplasmosis, Coccidioidomycosis, <strong>Syphilis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Non-caseating Granuloma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Sarcoidosis</strong>, Crohn’s disease, <strong>Leprosy</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Foreign Body Granuloma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Silicosis, Asbestos-related diseases, Foreign body reactions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Immune Granuloma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Wegener’s granulomatosis, Giant cell arteritis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Durck’s Granuloma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Cerebral malaria</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p><strong>Stellate Granuloma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:bottom\">\n<p>Cat scratch disease</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Arrange the following cellular events of inflammation in the correct sequence: Rolling Cytokine-mediated integrin activation Adhesion Migration", "options": [{"label": "A", "text": "1, 2, 3, 4", "correct": true}, {"label": "B", "text": "2, 1, 4, 3", "correct": false}, {"label": "C", "text": "4, 1, 3, 2", "correct": false}, {"label": "D", "text": "3, 4, 1, 2", "correct": false}], "correct_answer": "A. 1, 2, 3, 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/c15NSDxUI9gMlWr6Dsz71747057749.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "During wound healing, the cells that appear first, due to chemotaxis, at the site of the wound are:", "options": [{"label": "A", "text": "Neutrophils", "correct": true}, {"label": "B", "text": "Monocytes", "correct": false}, {"label": "C", "text": "Macrophages", "correct": false}, {"label": "D", "text": "Lymphocytes", "correct": false}], "correct_answer": "A. Neutrophils", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/UOoNzy03a4ImwzOvfjYJ1746091319.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:583px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Events in wound healing</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Day 0</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Platelets and Fibrin <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> blood clots.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Day 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Blood <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> remains and <strong>recruitment of neutrophils</strong> (acute inflammation).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Day 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Blood clots remain; neutrophils accumulate, followed by the formation of a thin epithelial layer.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Day 3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> sets in, and <strong>macrophages </strong>replace neutrophils.</p>\n<p>Granulation tissue begins (blood vessel formation starts)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Day 5</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Maximum <span class=\"customMeta\" data-dictid=\"09e414c5a71692777188ef029aefe5\">granulation</span> tissue (Maximum neovascularisation)</li>\n<li>Collagen <span class=\"customMeta\" data-dictid=\"ec4db08de51692777183e82739c83d\">bridging</span> starts</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Day 21(3rd Week)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Maximum <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> deposition (Type I collagen.)</p>\n</td>\n</tr>\n</tbody>\n\n<table align=\"left\" cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Primary intention</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Secondary intention</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Primary intention <span class=\"customMeta\" data-dictid=\"9cf83937931692777188a014337dcf\">healing</span> involves rapid <span class=\"customMeta\" data-dictid=\"2b4569285f1692777184282b1ca3f1\">closure</span> of a clean, surgically closed wound with minimal tissue loss, resulting in a small scar.</p>\n<p>E.g., <span class=\"customMeta\" data-dictid=\"81d12f9cb01692777199e44ff3f3c1\">Surgical</span> scar.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Secondary intention <span class=\"customMeta\" data-dictid=\"9cf83937931692777188a014337dcf\">healing</span> occurs when a wound is left open to granulate and epithelialise, often resulting in a larger <span class=\"customMeta\" data-dictid=\"561a199cce1692777198225706434c\">scar</span> and longer <span class=\"customMeta\" data-dictid=\"9cf83937931692777188a014337dcf\">healing</span> time.</p>\n<p>Associated with wound contraction. e.g., Road traffic accidents.</p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following molecules helps in the adhesion of the leukocyte to the endothelium during inflammation?", "options": [{"label": "A", "text": "P-selectin", "correct": false}, {"label": "B", "text": "Platelet-activating factor", "correct": false}, {"label": "C", "text": "VCAM-1", "correct": true}, {"label": "D", "text": "Complements", "correct": false}], "correct_answer": "C. VCAM-1", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/a4cEIxT0GyPLmfAyRPXH1747907673.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Cyclooxygenase plays a role in which of the following pathways?", "options": [{"label": "A", "text": "Kreb’s cycle", "correct": false}, {"label": "B", "text": "Prostaglandin", "correct": true}, {"label": "C", "text": "Leukotriene", "correct": false}, {"label": "D", "text": "Vitamin K", "correct": false}], "correct_answer": "B. Prostaglandin", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/mfXsvM37cfifBhGAwesV1745258758.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following cells with their locations: Cells Locations 1. Kupffer cells a. Stomach 2. Parietal cells b. Liver 3. Dust cells c. Alveoli 4. Clara cells d. Bronchioles", "options": [{"label": "A", "text": "1-a, 2-b, 3-c, 4-d", "correct": false}, {"label": "B", "text": "1-c, 2-d, 3-a, 4-b", "correct": false}, {"label": "C", "text": "1-d, 2-a, 3-d, 4-c", "correct": false}, {"label": "D", "text": "1-b, 2-a, 3-c, 4-d", "correct": true}], "correct_answer": "D. 1-b, 2-a, 3-c, 4-d", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:418px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Locations</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Kupffer cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Liver</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Parietal cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Stomach</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Dust cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Alveoli</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Clara cells</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Bronchioles</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the cytokines with the effector cells IL-4 Eosinophils IL-5 b. Mast cells IL-9 c. B cells IL-13 d. Dendritic cells", "options": [{"label": "A", "text": "1-c, 2-a, 3-b, 4-d", "correct": true}, {"label": "B", "text": "1-a, 2-c, 3-d, 4-b", "correct": false}, {"label": "C", "text": "1-b, 2-d, 3-c, 4-a", "correct": false}, {"label": "D", "text": "1-d, 2-b, 3-a, 4-c", "correct": false}], "correct_answer": "A. 1-c, 2-a, 3-b, 4-d", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:424px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Cytokine</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Effector Cell</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>B cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-5</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Eosinophils</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-9</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mast cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-13</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Dendritic cells</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Interleukin (IL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Function</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Promotes fever and <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and activates T cells and macrophages.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Stimulates growth and <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of T cells, critical for adaptive immunity.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Supports growth and <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> of <span class=\"customMeta\" data-dictid=\"d2e0ab499c169277718886ab5a46bf\">hematopoietic</span> cells (blood cell precursors).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-4</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Stimulates B cell <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> and promotes <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> production and Th2 response.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-5</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Stimulates <span class=\"customMeta\" data-dictid=\"7eba65a7251692777187eaa3b48258\">eosinophil</span> <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> and activation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-6</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Induces fever and acute-phase <span class=\"customMeta\" data-dictid=\"01c740e13716927771972becb9c378\">reactant</span> production and supports B cell differentiation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-7</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Essential for T and B cell development and survival.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-8 (CXCL8)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Attracts neutrophils to sites of infection (chemotaxis).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-9</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Promotes <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cell growth and regulates Th2 responses.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-10</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Anti-inflammatory; inhibits Th1 responses and <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> activity.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-12</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Stimulates Th1 cell <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> and enhances cytotoxic activity of T and NK cells.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-13</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Modulates immune responses and activates macrophages.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-17</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Promotes <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and <span class=\"customMeta\" data-dictid=\"9bb62ce0f71692777197fcc2b5f29c\">recruitment</span> of neutrophils, which are involved in autoimmunity.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-21</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Stimulates B cell differentiation, <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell generation, and Th17 response.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-22</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Induces <span class=\"customMeta\" data-dictid=\"78d28b340916927771810a3fffeb0a\">antimicrobial</span> <span class=\"customMeta\" data-dictid=\"53172b32401692777195efbbb6b2e8\">peptide</span> production and supports tissue repair.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IL-23</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Promotes Th17 <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> and <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> responses.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following molecules helps leukocytes roll over endothelial cells in vessels?", "options": [{"label": "A", "text": "Cadherins", "correct": false}, {"label": "B", "text": "PECAM-1", "correct": false}, {"label": "C", "text": "E-selectin", "correct": true}, {"label": "D", "text": "CD11a", "correct": false}], "correct_answer": "C. E-selectin", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/cA8m1FpyrKptqnkoV5av1745399989.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with complaints of cough, night sweats, and fever. A lung biopsy demonstrates the following histological findings. What is the most likely cytokine involved?", "options": [{"label": "A", "text": "Interferon-γ", "correct": true}, {"label": "B", "text": "Complement C5a", "correct": false}, {"label": "C", "text": "Histamine", "correct": false}, {"label": "D", "text": "Bradykinin", "correct": false}], "correct_answer": "A. Interferon-γ", "question_images": ["https://image.prepladder.com/content/Rp65EOsdRBcqTsHV3CMT1745925811.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which substance plays a role as a mediator in chronic inflammation?", "options": [{"label": "A", "text": "IL-1", "correct": false}, {"label": "B", "text": "TNF-α", "correct": false}, {"label": "C", "text": "TGF-β", "correct": true}, {"label": "D", "text": "None", "correct": false}], "correct_answer": "C. TGF-β", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - TGF\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Kz9YwhsX0nyr3BSXM0d01747057767.mp3", "video": ""}, {"text": "All of the following are correct about NETs except?", "options": [{"label": "A", "text": "May result in SLE", "correct": false}, {"label": "B", "text": "Phagocytosis", "correct": true}, {"label": "C", "text": "Sepsis", "correct": false}, {"label": "D", "text": "Arginine needed", "correct": false}], "correct_answer": "B. Phagocytosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/g9TJ1zuu3v62tLCPhBZ61747227893.png", "https://image.prepladder.com/content/vWVYLDO0OQINYuLXUNPF1747227893.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following: 1. IL-5 A. Regulates acute phase reactants 2. IL-6 B. T cell maturation 3. IL-7 C. Neutrophil recruitment 4. IL-8 D. Eosinophils activation", "options": [{"label": "A", "text": "1-B, 2-C, 3-D, 4-A", "correct": false}, {"label": "B", "text": "1-D, 2-A, 3-B, 4-C", "correct": true}, {"label": "C", "text": "1-C, 2-D, 3-B, 4-A", "correct": false}, {"label": "D", "text": "1-D, 2-C, 3-B, 4-A", "correct": false}], "correct_answer": "B. 1-D, 2-A, 3-B, 4-C", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-5 (Interleukin-5)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Eosinophils activation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-6 (Interleukin-6)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Regulates <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> phase reactants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-7 (Interleukin-7)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>T cell maturation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IL-8 (Interleukin-8)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neutrophil recruitment</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old female presents with cervical lymphadenopathy. A biopsy has revealed granulomatous necrotising inflammation. Which of the following options is correct?", "options": [{"label": "A", "text": "Metastatic calcification with normal serum calcium level", "correct": false}, {"label": "B", "text": "Dystrophic calcification with normal serum calcium level", "correct": true}, {"label": "C", "text": "Metastatic calcification with increased serum calcium level", "correct": false}, {"label": "D", "text": "Dystrophic calcification with increased serum calcium level", "correct": false}], "correct_answer": "B. Dystrophic calcification with normal serum calcium level", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/fwv3WBla2wnXgFXeJ3px1747220212.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most effective enzyme in Acute inflammation?", "options": [{"label": "A", "text": "NADPH oxidase", "correct": true}, {"label": "B", "text": "Defensin", "correct": false}, {"label": "C", "text": "Catalase", "correct": false}, {"label": "D", "text": "MPO", "correct": false}], "correct_answer": "A. NADPH oxidase", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic Inflammation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Causative agent</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pathogen, injured tissues</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Persistent <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> due to non-degradable pathogens, persistent foreign bodies, or <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> reactions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells infiltrated</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Neutrophils/Polymorphonuclear cells (PMN).</strong></p>\n<p>Exception: Typhoid (<strong>Relative Lymphocytosis</strong>)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymphocytes, macrophages, </strong><strong>and</strong><strong> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells</strong></p>\n<p>Exception: Chronic</p>\n<p>Pseudomonas (it shows the <span class=\"customMeta\" data-dictid=\"47d4b14d841692777195ec9f299139\">persistence</span> of <strong>Neutrophils</strong><strong>)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary mediators</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vasoactive amines, eicosanoids</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IFN-y and other cytokines, growth factors, <span class=\"customMeta\" data-dictid=\"092583d1b41692777197a506409267\">reactive</span> oxygen species, <span class=\"customMeta\" data-dictid=\"310799d8981692777189d3a272674d\">hydrolytic</span> enzymes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediate.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Delayed.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Duration</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Few days.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Up to many months or years.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Outcomes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Resolution, <span class=\"customMeta\" data-dictid=\"5618681fbe16927771804370383aaa\">abscess</span> formation, chronic inflammation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tissue destruction, fibrosis.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following parameters decreases acute inflammation?", "options": [{"label": "A", "text": "CRP", "correct": false}, {"label": "B", "text": "Hepcidin", "correct": false}, {"label": "C", "text": "Fibrinogen", "correct": false}, {"label": "D", "text": "Albumin", "correct": true}], "correct_answer": "D. Albumin", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic Inflammation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Causative agent</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pathogen, injured tissues</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Persistent <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> due to non-degradable pathogens, persistent foreign bodies, or <span class=\"customMeta\" data-dictid=\"96ab11a06a16927771823151c8e471\">autoimmune</span> reactions</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells infiltrated</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Neutrophils/Polymorphonuclear cells (PMN).</strong></p>\n\t\t\t \n\n\t\t\t<p><strong>Exception:</strong> Typhoid (<strong>Relative Lymphocytosis</strong>)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymphocytes, macrophages, </strong><strong>and</strong><strong> <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells</strong></p>\n\t\t\t \n\n\t\t\t<p><strong>Exception: </strong>Chronic</p>\n<p>Pseudomonas (it shows the <span class=\"customMeta\" data-dictid=\"47d4b14d841692777195ec9f299139\">persistence</span> of <strong>Neutrophils</strong>)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary mediators</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vasoactive amines, eicosanoids</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IFN-y and other cytokines, growth factors, <span class=\"customMeta\" data-dictid=\"092583d1b41692777197a506409267\">reactive</span> oxygen species, <span class=\"customMeta\" data-dictid=\"310799d8981692777189d3a272674d\">hydrolytic</span> enzymes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Delayed</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Duration</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Few days</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Up to many months or years</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Outcomes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Resolution, <span class=\"customMeta\" data-dictid=\"5618681fbe16927771804370383aaa\">abscess</span> formation, chronic inflammation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tissue destruction, fibrosis</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are growth-promoting proto-oncogenes, except?", "options": [{"label": "A", "text": "FGF", "correct": false}, {"label": "B", "text": "PDGF", "correct": false}, {"label": "C", "text": "TGF-α", "correct": false}, {"label": "D", "text": "TGF-β", "correct": true}], "correct_answer": "D. TGF-β", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - TGF-β\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Growth Factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Sources</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Functions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Fibroblast growth factors (FGFs) </strong>including <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> (FGF-1) and basic (FGF-2)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Macrophages, <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells, endothelial cells, many other cell types</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Attracts and stimulates fibroblasts; promotes <span class=\"customMeta\" data-dictid=\"2c25c78eca1692777181c8c8fdae31\">angiogenesis</span> and <span class=\"customMeta\" data-dictid=\"cc804137e416927771867467b03daa\">ECM</span> protein synthesis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Platelet-derived growth factor (PDGF)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Platelets, macrophages, endothelial cells, smooth muscle cells, keratinocytes</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Attracts neutrophils, macrophages, fibroblasts, and smooth muscle cells; activates and stimulates <span class=\"customMeta\" data-dictid=\"3095c5f0fc1692777202eda8060779\">fibroblast</span> and endothelial cell proliferation; stimulates <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">extracellular</span> <span class=\"customMeta\" data-dictid=\"14958c535b1692777192abd2a85abf\">matrix</span> (ECM) protein synthesis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Transforming growth factor-α (TGF-α)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Activated macrophages, keratinocytes, many other cells</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Stimulates <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> of hepatocytes and various epithelial cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Transforming growth factor-β (TGF-β)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Platelets, T lymphocytes, macrophages, endothelial cells, epithelial cells, smooth muscle cells, fibroblasts</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Attracts leukocytes and fibroblasts; stimulates <span class=\"customMeta\" data-dictid=\"cc804137e416927771867467b03daa\">ECM</span> protein synthesis; suppresses <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> inflammation</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/wo0iewYjCqWT6kzWZUAr1747058173.mp3", "video": ""}, {"text": "Which of the following cytokines does not cause the Jarisch-Herxheimer reaction?", "options": [{"label": "A", "text": "TNF alpha", "correct": false}, {"label": "B", "text": "IL-6", "correct": false}, {"label": "C", "text": "IL-8", "correct": false}, {"label": "D", "text": "INF-γ", "correct": true}], "correct_answer": "D. INF-γ", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following: 1. IL-5 A. Regulates acute phase reactants 2. IL-6 B. T cell maturation 3. IL-7 C. Neutrophil recruitment 4. IL-8 D. Eosinophils activation", "options": [{"label": "A", "text": "1-B, 2-C, 3-D, 4-A", "correct": false}, {"label": "B", "text": "1-D, 2-A, 3-B, 4-C", "correct": true}, {"label": "C", "text": "1-C, 2-D, 3-B, 4-A", "correct": false}, {"label": "D", "text": "1-D, 2-C, 3-B, 4-A", "correct": false}], "correct_answer": "B. 1-D, 2-A, 3-B, 4-C", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:513px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p>IL-5 (Interleukin-5)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p>Eosinophils activation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>IL-6 (Interleukin-6)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Regulates <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> phase reactants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>IL-7 (Interleukin-7)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>T cell maturation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>IL-8 (Interleukin-8)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Neutrophil recruitment</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is involved in the recognition and clearance of necrotic cells?", "options": [{"label": "A", "text": "Inflammasome", "correct": true}, {"label": "B", "text": "Toll-like receptors (TLRs)", "correct": false}, {"label": "C", "text": "P-selectin", "correct": false}, {"label": "D", "text": "Manoreceptor", "correct": false}], "correct_answer": "A. Inflammasome", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - I\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/tKgOfMkwUcGCnQDovIo01747057158.mp3", "video": ""}, {"text": "Match the following: 1. Howell-Jolly bodies A. Ig inclusions 2. Dohle bodies B. Azurophilic granules 3. Flame cells C. Nuclear material remnants 4. Auer rod cells D. Remnants of ER", "options": [{"label": "A", "text": "1-C, 2-D, 3-A, 4-B", "correct": true}, {"label": "B", "text": "1-A, 2-B, 3-C, 4-D", "correct": false}, {"label": "C", "text": "1-C, 2-D, 3-B, 4-A", "correct": false}, {"label": "D", "text": "1-D, 2-B, 3-A, 4-C", "correct": false}], "correct_answer": "A. 1-C, 2-D, 3-A, 4-B", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/KpTeVWqCxdsHDFwYYDxk1712230362.png", "https://image.prepladder.com/content/5DEo01fwn7zlFgPvd1lg1712230374.png", "https://image.prepladder.com/content/V5BQALZWidaCmRkNtuWf1712230393.png"], "explanation": "<p>Correct Option A - 1-C, 2-D, 3-A, 4-B:</p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td>1. Howell-Jolly bodies</td>\n<td>C. Nuclear material remnants</td>\n</tr>\n<tr>\n<td>2. Dohle bodies</td>\n<td>D. Remnants of ER</td>\n</tr>\n<tr>\n<td>3. Flame cells</td>\n<td>A. Ig inclusions</td>\n</tr>\n<tr>\n<td>4. Auer rod cells</td>\n<td>B. <span class=\"customMeta\" data-dictid=\"2fbcd980171692777182d07ca6812c\">Azurophilic</span> granules</td>\n</tr>\n</tbody>\n\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td><strong>Howell-Jolly bodies</strong></td>\n<td>\n<ul>\n<li>Howell-Jolly bodies are small, round nuclear remnants found in red blood cells.</li>\n</ul>\n<p><img src=\"https://image.prepladder.com/content/KpTeVWqCxdsHDFwYYDxk1712230362.png\" style=\"height:526px; width:500px\"/></p>\n</td>\n</tr>\n<tr>\n<td><strong>Dohle bodies</strong></td>\n<td>\n<ul>\n<li>Dohle bodies are blue-grey cytoplasmic inclusions found in the white blood cells, particularly neutrophils.</li>\n<li>They appear as small, irregularly shaped granules or vacuoles in the cytoplasm.</li>\n</ul>\n<p><img src=\"https://image.prepladder.com/content/5DEo01fwn7zlFgPvd1lg1712230374.png\" style=\"height:507px; width:500px\"/></p>\n</td>\n</tr>\n<tr>\n<td><strong>Flame cells</strong></td>\n<td>\n<ul>\n<li>Flame cells, also known as urothelial cells, are specialized cells found in the <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> tubules of the kidney.</li>\n<li>They have a distinct appearance with a central <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> and numerous hair-like extensions (cilia) that resemble a flame.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>Auer rod cells</strong></td>\n<td>\n<ul>\n<li>Auer rod cells are abnormal, rod-shaped structures that can be observed in the <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> of <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> <span class=\"customMeta\" data-dictid=\"ae13cdc5c3169277719683e9f6bda5\">precursor</span> cells, particularly in <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> leukemia.</li>\n<li>These rod-like structures consist of fused granules of primary granules found in the <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> of leukemic blast cells.</li>\n</ul>\n<p><img src=\"https://image.prepladder.com/content/V5BQALZWidaCmRkNtuWf1712230393.png\" style=\"height:465px; width:500px\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/jBRzEsqeO6DZf2HuBBfa1747057645.mp3", "video": ""}, {"text": "Which of the following is an opsonin?", "options": [{"label": "A", "text": "C3a", "correct": false}, {"label": "B", "text": "C3b", "correct": true}, {"label": "C", "text": "C5a", "correct": false}, {"label": "D", "text": "C6", "correct": false}], "correct_answer": "B. C3b", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - C3\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/zAtDd0cSZNpQ2L81LcHW1747055840.mp3", "video": ""}, {"text": "Fever occurs during inflammation due to all except :", "options": [{"label": "A", "text": "IL-1", "correct": false}, {"label": "B", "text": "Prostaglandins", "correct": false}, {"label": "C", "text": "TNF", "correct": false}, {"label": "D", "text": "Histamine", "correct": true}], "correct_answer": "D. Histamine", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - H\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td><strong>Fever</strong></td>\n<td>\n<ul>\n<li>IL-1</li>\n<li>IL-6</li>\n<li>TNF-α</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>T-cell maturation</strong></td>\n<td>IL-7</td>\n</tr>\n<tr>\n<td><strong>Eosinophils activation</strong></td>\n<td>IL-5</td>\n</tr>\n<tr>\n<td><strong>Neutrophil recruitment</strong></td>\n<td>IL-8</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/WiXjt7ApJEnSA92vVYtH1747055698.mp3", "video": ""}, {"text": "Stellate granuloma is seen in:", "options": [{"label": "A", "text": "Sarcoidosis", "correct": false}, {"label": "B", "text": "Cat-scratch disease", "correct": true}, {"label": "C", "text": "Cryptococcosis", "correct": false}, {"label": "D", "text": "Histoplasmosis", "correct": false}], "correct_answer": "B. Cat-scratch disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/leIsZy4OSQWYDehV0Pqw1712309772.png", "https://image.prepladder.com/content/leIsZy4OSQWYDehV0Pqw1712309772.png"], "explanation": "<p>Correct Option B - Cat-scratch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/CEnX13Vk31XjXkiJiJLm1747055594.mp3", "video": ""}, {"text": "Which of the following is true about fever?", "options": [{"label": "A", "text": "Aspirin increases fever by inhibiting prostaglandin synthesis", "correct": false}, {"label": "B", "text": "PGD2 is responsible for resetting the temperature to a higher level", "correct": false}, {"label": "C", "text": "IL-1 is an endogenous pyrogen", "correct": true}, {"label": "D", "text": "Fever occurs during inflammation due to release of histamine", "correct": false}], "correct_answer": "C. IL-1 is an endogenous pyrogen", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - IL-1 is an <span class=\"customMeta\" data-dictid=\"2a7f0b780c1692777187fe83ec76b1\">endogenous</span> pyrog\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/a2ECbQhTWTNOaFL38CO81747055329.mp3", "video": ""}, {"text": "IL-1 is activated by:", "options": [{"label": "A", "text": "Caspase-1", "correct": true}, {"label": "B", "text": "Caspase-3", "correct": false}, {"label": "C", "text": "Caspase-9", "correct": false}, {"label": "D", "text": "Caspase-8", "correct": false}], "correct_answer": "A. Caspase-1", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - C\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/6ogDQIwn67ac8mebVnpR1747055101.mp3", "video": ""}, {"text": "Which of the following causes vasodilation?", "options": [{"label": "A", "text": "Histamine", "correct": true}, {"label": "B", "text": "Thromboxane A2", "correct": false}, {"label": "C", "text": "Angiotensin II", "correct": false}, {"label": "D", "text": "Leukotriene C4", "correct": false}], "correct_answer": "A. Histamine", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - H\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Vasodilators</strong></td>\n<td style=\"text-align:center\"><strong>Vasoconstrictors</strong></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Nitric <span class=\"customMeta\" data-dictid=\"e08c004e8f1692777194c9d37e17ad\">oxide</span> (NO)</td>\n<td style=\"text-align:center\">Norepinephrine</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Prostacyclin (PGI<sub>2</sub>)</td>\n<td style=\"text-align:center\">Angiotensin II</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Adenosine</td>\n<td style=\"text-align:center\">Endothelin-1</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Histamine</td>\n<td style=\"text-align:center\">Thromboxane A2</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Bradykinin</td>\n<td style=\"text-align:center\">Serotonin</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Carbon <span class=\"customMeta\" data-dictid=\"0bd01a042116927771868e3482910e\">dioxide</span> (CO<sub>2</sub>)</td>\n<td style=\"text-align:center\">Vasopressin</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Acetylcholine</td>\n<td style=\"text-align:center\">Alpha-1 <span class=\"customMeta\" data-dictid=\"0132a02ec31692777180a840765aff\">adrenergic</span> agonists (e.g., phenylephrine)</td>\n</tr>\n<tr>\n<td style=\"text-align:center\">Potassium channel openers (e.g., minoxidil)</td>\n<td style=\"text-align:center\">Neuropeptide Y</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/QNisjUu2OCQv1AdbP0lg1747057490.mp3", "video": ""}, {"text": "An acute inflammatory response is not seen in which of the following?", "options": [{"label": "A", "text": "Pyroptosis", "correct": false}, {"label": "B", "text": "Necroptosis", "correct": false}, {"label": "C", "text": "Apoptosis", "correct": true}, {"label": "D", "text": "Necrosis", "correct": false}], "correct_answer": "C. Apoptosis", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - A\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td> </td>\n<td><strong>Mechanism</strong></td>\n</tr>\n<tr>\n<td><strong>Pyroptosis</strong></td>\n<td>\n<ul>\n<li>Activation of <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> caspases</li>\n<li>Formation of <span class=\"customMeta\" data-dictid=\"282201f8341692777190c016904203\">inflammasome</span> complexes</li>\n<li>Release of pro-inflammatory cytokines and DAMPs</li>\n<li>Induction of cell swelling, <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> rupture, and lysis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>Necroptosis</strong></td>\n<td>\n<ul>\n<li>Activation of receptor-interacting protein kinases (RIPKs)</li>\n<li>Formation of necrosome complexes</li>\n<li>Release of pro-inflammatory cytokines and DAMPs</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>Apoptosis</strong></td>\n<td>\n<ul>\n<li>Activation of caspases</li>\n<li>Cellular <span class=\"customMeta\" data-dictid=\"a6bf9ae43716927771846b12080dc0\">condensation</span> and fragmentation</li>\n<li>Formation of apoptotic bodies</li>\n<li>Recognition and <span class=\"customMeta\" data-dictid=\"aa86b61bdd1692777195ea42ef0356\">phagocytosis</span> of apoptotic cells</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td><strong>Necrosis</strong></td>\n<td>\n<ul>\n<li>Cellular injury or damage</li>\n<li>Disruption of <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> membranes</li>\n<li>Release of <span class=\"customMeta\" data-dictid=\"a621be29da16927771901bc91014d1\">intracellular</span> contents and DAMPs</li>\n<li>Induction of an <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> response</li>\n<li>Recruitment of immune cells, such as neutrophils and macrophages</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2sgTbj1SRdopHJ1Y8hyE1747057368.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 39 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is the most common benign tumor of the liver?", "options": [{"label": "A", "text": "Cavernous hemangioma", "correct": true}, {"label": "B", "text": "Hepatoblastoma", "correct": false}, {"label": "C", "text": "Klatskin tumor", "correct": false}, {"label": "D", "text": "Hepatic adenoma", "correct": false}], "correct_answer": "A. Cavernous hemangioma", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/FR1UBVKFYzeb7JgoNjKR1737649622.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>M/C </strong>benign <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> tumour</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cavernous hemangioma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>M/C </strong>hepatic tumour in children</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hepatoblastoma (Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>M/C </strong>Primary liver malignancy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hepatocellular carcinoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>M/C </strong>cancer, which <span class=\"customMeta\" data-dictid=\"d3251bfb0b1692777192b069d7ba4a\">metastasis</span> to the liver</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Colon <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>M/C </strong>sarcoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Angiosarcoma </strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old woman presents to the emergency department with severe abdominal pain and signs of hypovolemic shock. She has a history of long-term contraceptive pill use. Imaging studies reveal a large hepatic mass with evidence of haemorrhage. Laboratory tests show elevated liver enzymes. What is the likely diagnosis based on her clinical presentation and medical history?", "options": [{"label": "A", "text": "Angiosarcoma", "correct": false}, {"label": "B", "text": "Hepatic adenoma", "correct": true}, {"label": "C", "text": "Hepatoblastoma", "correct": false}, {"label": "D", "text": "Cholangiocarcinoma", "correct": false}], "correct_answer": "B. Hepatic adenoma", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old sexually active woman who has been on OCP for the past 4 years comes to the ER with severe abdominal pain and features of hypovolemic shock. Ultrasound reveals a large hemorrhagic hepatic mass and fluid in the peritoneum. What is the most probable diagnosis?", "options": [{"label": "A", "text": "Hepatocyte nuclear factor 1-alpha (HNF1α)-inactivated hepatocellular adenoma", "correct": false}, {"label": "B", "text": "β-Catenin–activated hepatocellular adenoma", "correct": true}, {"label": "C", "text": "Nodular regenerative hyperplasia (NRH).", "correct": false}, {"label": "D", "text": "Focal Nodular Hyperplasia", "correct": false}], "correct_answer": "B. β-Catenin–activated hepatocellular adenoma", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions presents with a central stellate scar?", "options": [{"label": "A", "text": "Metastatic liver lesion", "correct": false}, {"label": "B", "text": "Focal Nodular Hyperplasia", "correct": true}, {"label": "C", "text": "Liver abscess", "correct": false}, {"label": "D", "text": "Liver Cirrhosis", "correct": false}], "correct_answer": "B. Focal Nodular Hyperplasia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following increases the risk of Hepatocellular carcinoma, except?", "options": [{"label": "A", "text": "Alcohol", "correct": false}, {"label": "B", "text": "NASH (Non-Alcoholic Steatohepatitis)", "correct": false}, {"label": "C", "text": "Hemochromatosis", "correct": false}, {"label": "D", "text": "Gilbert's syndrome", "correct": true}], "correct_answer": "D. Gilbert's syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding the fibrolamellar variant of hepatocellular carcinoma ?", "options": [{"label": "A", "text": "Not associated with Hepatitis B, C", "correct": true}, {"label": "B", "text": "Increased AFP levels", "correct": false}, {"label": "C", "text": "Hematogenous spread", "correct": false}, {"label": "D", "text": "Poor prognosis", "correct": false}], "correct_answer": "A. Not associated with Hepatitis B, C", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/HF2HdOnTnfnEyO3Z2ySk1737650701.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Fibrolamellar <span class=\"customMeta\" data-dictid=\"0efdcdc9e01692777201003c81c85a\">variant</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Classical HCC</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adolescents and young adults</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Older adults</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gender </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Male=Female</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Male>Female</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Predisposing condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hepatitis B and C, Alcohol, NASH, Hemochromatosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AFP levels </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DNAJB1-PRKACA</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TERT, Beta-catenin, TP53</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Spread </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphatic</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hematogenous <strong>(Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Good <strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Poor</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum markers </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neurotensin B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AFP, PIVKA II, Osteopontin, Glycipan 3, HepPar 1</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histology <span class=\"customMeta\" data-dictid=\"54e0888a6616927771945a99208287\">pathology</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"Fibrolamellar <span class=\" custommeta\"=\"\" data-dictid=\"0efdcdc9e01692777201003c81c85a\"/>Variant \" data-author=\"Nephron\" data-hash=\"812\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Fibrolamellar_hepatocellular_carcinoma_-2-_very_high_mag.jpg\" data-tags=\"January2025\" height=\"343\" src=\"https://image.prepladder.com/notes/jfNEtRR7yEuHI31d0s061737650660.png\" width=\"500\" /></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\" Clasical HCC\" data-author=\"Quaglia, A\" data-hash=\"813\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.tandfonline.com/doi/full/10.2147/JHC.S159808#d1e89\" data-tags=\"January2025\" height=\"390\" src=\"https://image.prepladder.com/notes/HF2HdOnTnfnEyO3Z2ySk1737650701.png\" width=\"500\"/></td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient with a longstanding history of alcoholism is admitted with jaundice, abdominal distension &amp; weight loss. A liver biopsy done during his previous admission showed the following changes, and suspicion of malignant transformation is raised now. Elevation of which of the following markers will support the differential? HepPar-1 Alpha-fetoprotein (AFP) Glypican-3 (GPC3) CA 15-3 Tissue polypeptide antigen", "options": [{"label": "A", "text": "1, 2 and 4", "correct": false}, {"label": "B", "text": "1, 2 and 3", "correct": true}, {"label": "C", "text": "2, 4 and 5", "correct": false}, {"label": "D", "text": "2, 3 and 4", "correct": false}], "correct_answer": "B. 1, 2 and 3", "question_images": ["https://image.prepladder.com/notes/PBQ3aF3b4RidIWpp0YTZ1737650983.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/TO7wFgPMjHMjHaJ1Yoo11745347855.mp3", "video": ""}, {"text": "A 2-year-old child presented with progressive jaundice for the past 2 months. Initial investigations were done, and subsequent histopathological examination of liver biopsy showed changes consistent with hepatoblastoma. Which of the following additional biomarkers will be elevated in this child?", "options": [{"label": "A", "text": "CA 19-9", "correct": false}, {"label": "B", "text": "AFP", "correct": true}, {"label": "C", "text": "Neurotensin", "correct": false}, {"label": "D", "text": "CEA", "correct": false}], "correct_answer": "B. AFP", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Malignancy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Non-malignant conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hepatocellular carcinoma</li>\n<li>Hepatoblastoma</li>\n<li>Secondary liver metastasis</li>\n<li>Nonseminomatous <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumours</li>\n<li>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Neural tube defects</li>\n<li>Ataxia telangiectasia</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a genetic mutation associated with hereditary pancreatitis?", "options": [{"label": "A", "text": "PRSS1", "correct": false}, {"label": "B", "text": "SPINK1", "correct": false}, {"label": "C", "text": "CFTR", "correct": false}, {"label": "D", "text": "BRCA1", "correct": true}], "correct_answer": "D. BRCA1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PRSS1 (trypsinogen 1 gene) <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common cause for <span class=\"customMeta\" data-dictid=\"ee5175c06116927771880846d1cbe0\">hereditary</span> pancreatitis.</li>\n<li>Autosomal dominant inheritance</li>\n<li>Gain-of-function <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> make <span class=\"customMeta\" data-dictid=\"be1c04825c169277720006550a3ab2\">trypsin</span> resistant to self-inactivation</li>\n<li>Increased risk of developing <span class=\"customMeta\" data-dictid=\"30a7f9a9e716927771847094b1a36f\">chronic pancreatitis</span> and pancreatic cancer.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>SPINK1<strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> inheritance</li>\n<li>Loss of function <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> <span class=\"customMeta\" data-dictid=\"b989cb3b0d1692777187dd7965b4d3\">encoding</span> a <span class=\"customMeta\" data-dictid=\"be1c04825c169277720006550a3ab2\">trypsin</span> inhibitor</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CFTR (cystic <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> <span class=\"customMeta\" data-dictid=\"f0c8d0b3871692777200426e503319\">transmembrane</span> conductance regulator) <strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Loss of <span class=\"customMeta\" data-dictid=\"da0dfb8fa61692777184291349addf\">CFTR</span> leads to <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> secretions</li>\n<li>Promote plugging and <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> obstruction</li>\n<li>Associated conditions: <span class=\"customMeta\" data-dictid=\"c64e3a661b1692777197afc2ff7bca\">recurrent</span> <span class=\"customMeta\" data-dictid=\"6266bf3b0b1692777198fdc36807cb\">sinopulmonary</span> infections, intestinal obstruction, diabetes, and male infertility.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CASR (Calcium-sensing receptor):</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mutation alters <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> concentrations and activates trypsin.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CTRC (Chymotrypsin C):</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Responsible for protecting <span class=\"customMeta\" data-dictid=\"2e2fe8c6c116927771946fb9a8adb0\">pancreas</span> from trypsin-related injury.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CPA1 (Carboxypeptidase A1):</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Acts as exopeptidase, regulating <span class=\"customMeta\" data-dictid=\"815b30b2c616927772020827a24c53\">zymogen</span> activation.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/LHKNpDSUBJGi6j4P1DQb1747306687.mp3", "video": ""}, {"text": "Which of the following factors is most strongly associated with the development of acute pancreatitis in adult males?", "options": [{"label": "A", "text": "Gallstone disease", "correct": false}, {"label": "B", "text": "Alcohol", "correct": true}, {"label": "C", "text": "Trauma", "correct": false}, {"label": "D", "text": "HIV infection", "correct": false}], "correct_answer": "B. Alcohol", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presented with a history of type-2 diabetes and hypertension presented to hospital with a 3 day history of generalized weakness, diffuse abdominal pain and altered mental status. Upon examination, her GCS was 10 with diffuse abdominal tenderness. Investigations showed elevated glucose, creatinine, lipase, and calcium levels. Histopathological examination suggests which of the following associated findings in this patient?", "options": [{"label": "A", "text": "Pancreatic hyperplasia", "correct": false}, {"label": "B", "text": "Destruction of pancreatic beta cells", "correct": false}, {"label": "C", "text": "Intracellular activation of enzymes", "correct": true}, {"label": "D", "text": "Fibrosis of pancreatic ducts", "correct": false}], "correct_answer": "C. Intracellular activation of enzymes", "question_images": ["https://image.prepladder.com/content/aGGv51klIXddvX5lWZ4q1736911837.png"], "explanation_images": ["https://image.prepladder.com/content/r8QrQCKqbTCu9AZtzN7D1736911794.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A female patient presents with progressive jaundice and weight loss for the past six months. She also complains of low grade upper abdominal pain. Lab investigation revealed a random blood sugar of 320mg/dL and a raised serum Ig-G4 levels and a USG scan showed a mass like lesion over the head of pancreas. Based on these findings which of the following is the most likely finding in the histopathological examination ?", "options": [{"label": "A", "text": "Pleomorphic cuboidal to columnar epithelial cells", "correct": false}, {"label": "B", "text": "Necrotic changes in the acini and ducts", "correct": false}, {"label": "C", "text": "Honeycombing appearance with cuboidal epithelium", "correct": false}, {"label": "D", "text": "Swirling fibrosis with inflammation of veins", "correct": true}], "correct_answer": "D. Swirling fibrosis with inflammation of veins", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/AkNnK9ErTFnEbstxEEJe1737652401.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:759px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Autoimmune <span class=\"customMeta\" data-dictid=\"98ea94d2c01692777194cc5ffee153\">pancreatitis</span> </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type 1 - IgG4</strong> associated - common in adults</p>\n<p><strong>Type 2 - Non-IgG4 </strong>associated - common in younger age groups</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low <span class=\"customMeta\" data-dictid=\"d4ae50897e16927771884b5c46ba7d\">grade</span> <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">Abdominal</span> pain</p>\n<p>Jaundice</p>\n<p>Weight loss</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lab findings </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated IgG4 (except in type 2)</p>\n<p>Elevated liver enzymes</p>\n<p>Elevated pancreatic enzymes</p>\n<p>Elevated blood sugar</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>USG</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse <span class=\"customMeta\" data-dictid=\"41e56d9a54169277718724ff8c225f\">enlargement</span> of pancreas</p>\n<p>Focal <span class=\"customMeta\" data-dictid=\"41e56d9a54169277718724ff8c225f\">enlargement</span> can be present mimicking a malignancy</p>\n<p>Narrowing of pancreatic ducts</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphoplasmacytic <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> predominantly made up of IgG4-positive <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells (except in type 2)</p>\n<p>Swirling <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> (storiform fibrosis) and <span class=\"customMeta\" data-dictid=\"f81ec0339f1692777194ddc81dbc98\">Obliterative phlebitis</span> (inflammation of veins)</p>\n<p><img alt=\"Autoimmune pancreatitis\" data-author=\" David J. Escobar\" data-hash=\"815\" data-license=\"NA\" data-source=\"https://www.pathologyoutlines.com/topic/pancreasaiptype2.html\" data-tags=\"January2025\" height=\"384\" src=\"https://image.prepladder.com/notes/AkNnK9ErTFnEbstxEEJe1737652401.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Excellent response to steroids</p>\n<p>Azathioprine for <span class=\"customMeta\" data-dictid=\"adcb58dd951692777197332b13ebe2\">relapsing</span> disease</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements about pancreatic cystic neoplasms is true?", "options": [{"label": "A", "text": "Serous cystadenomas are commonly malignant.", "correct": false}, {"label": "B", "text": "Mucinous cystic neoplasms (MCNs) occur predominantly in males.", "correct": false}, {"label": "C", "text": "Intraductal papillary mucinous neoplasms (IPMNs) have a risk of malignant transformation.", "correct": true}, {"label": "D", "text": "Mucinous cystic neoplasms typically have a central scar on imaging.", "correct": false}], "correct_answer": "C. Intraductal papillary mucinous neoplasms (IPMNs) have a risk of malignant transformation.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:641px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serous <span class=\"customMeta\" data-dictid=\"1289a1c47f1692777185c6c0e0b2b2\">cystadenoma</span> (Option A) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mucinous <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> <span class=\"customMeta\" data-dictid=\"1622f69a94169277719372b76236ca\">neoplasm</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intraductal <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">Papillary</span> <span class=\"customMeta\" data-dictid=\"2f72b35d711692777193801d8e084d\">Mucinous</span> <span class=\"customMeta\" data-dictid=\"1622f69a94169277719372b76236ca\">Neoplasm</span> (IPMN) (Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Demographics </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Females > males</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Females > males <strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Males = females</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Head of pancreas</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Body or tail of pancreas</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Anywhere in pancreas</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Morphology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microcystic , <span class=\"customMeta\" data-dictid=\"9752f851871692777189e682ec3146\">honeycombing</span> appearance with central scar</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Macrocystic, multilocular,<strong> no central scar</strong> <strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dilated ducts with <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> projections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Malignancy risk </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High (main duct> mixed> branch duct)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glycogen rich <span class=\"customMeta\" data-dictid=\"0acd7f0c95169277718587e7a53876\">cuboidal</span> cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ovarian like <span class=\"customMeta\" data-dictid=\"c077aecdcd1692777199503c836d9c\">stroma</span> with <span class=\"customMeta\" data-dictid=\"7d30ef9aee16927771936bdac2c1ff\">mucin</span> secreting epithelium</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Papillary architecture with <span class=\"customMeta\" data-dictid=\"7d30ef9aee16927771936bdac2c1ff\">mucin</span> secreting epithelium</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum markers </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>N/A</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CEA and CA 19-9</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CEA</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Symptoms </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Usually asymptomatic</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Abdominal pain due to mass effect</p>\n<p>Weight loss</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Recurrent <span class=\"customMeta\" data-dictid=\"98ea94d2c01692777194cc5ffee153\">pancreatitis</span> or jaundice</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Imaging </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Microcystic with central <span class=\"customMeta\" data-dictid=\"561a199cce1692777198225706434c\">scar</span> and <span class=\"customMeta\" data-dictid=\"41b4e6c32f169277719986f77fbe28\">stellate</span> calcification</p>\n<p>Thin septation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Unilocular or multilocular</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dilated pancreatic <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> or <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> lesion</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 23 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is the manifestation of increased estrogen levels in Cirrhosis?", "options": [{"label": "A", "text": "Increased PT and aPTT", "correct": false}, {"label": "B", "text": "Flapping tremors", "correct": false}, {"label": "C", "text": "Palmar erythema", "correct": true}, {"label": "D", "text": "Jaundice", "correct": false}], "correct_answer": "C. Palmar erythema", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not typically associated with developing fatty liver disease?", "options": [{"label": "A", "text": "Hepatitis B", "correct": true}, {"label": "B", "text": "Hepatitis C", "correct": false}, {"label": "C", "text": "Type 2 diabetes", "correct": false}, {"label": "D", "text": "Alcoholism", "correct": false}], "correct_answer": "A. Hepatitis B", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is typically observed in liver biopsy findings of acute hepatitis A infection?", "options": [{"label": "A", "text": "Interface hepatitis", "correct": false}, {"label": "B", "text": "Councilman bodies", "correct": true}, {"label": "C", "text": "Ground glass hepatocytes", "correct": false}, {"label": "D", "text": "Bridging fibrosis", "correct": false}], "correct_answer": "B. Councilman bodies", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/kh8K14axt5sRUbZbhHJD1736912206.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute Hepatitis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic Hepatitis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ballooning degeneration</li>\n<li>Councilman bodies</li>\n<li>Spotty necrosis</li>\n<li>Dropout <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and Kupffer cell hyperplasia</li>\n<li>Absent or mild <span class=\"customMeta\" data-dictid=\"a74252404f1692777196d3f24bde2d\">portal</span> inflammation</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Interface hepatitis</li>\n<li>Ground glass hepatocytes</li>\n<li>Bridging necrosis</li>\n<li>Lymphoplasmacytic infiltration</li>\n<li>Extensive <span class=\"customMeta\" data-dictid=\"a74252404f1692777196d3f24bde2d\">portal</span> inflammation</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely autoantibody detected in Type I autoimmune hepatitis (AIH)?", "options": [{"label": "A", "text": "Anti-LKM 1", "correct": false}, {"label": "B", "text": "Anti-smooth muscle antibodies (ASMA)", "correct": true}, {"label": "C", "text": "Anti-Liver Cytosol 1 (ACL-1)", "correct": false}, {"label": "D", "text": "Anti-cyclic citrullinated peptide (anti-CCP)", "correct": false}], "correct_answer": "B. Anti-smooth muscle antibodies (ASMA)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:594px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type I <span class=\"customMeta\" data-dictid=\"f88b577ea11692777180369ebdb5c4\">AIH</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type II AIH</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>More common in</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Young female</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Children</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Auto-antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anti SMA (Anti smooth muscle antibody) <strong>(Option B)</strong></li>\n<li>ANA (Anti-nuclear antibody)</li>\n<li>Anti-soluble liver antigen</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Anti LKM- 1 (Hepatitis C) <strong>(Option A)</strong></li>\n<li>Anti–liver cytosol-1 (ACL-1) <strong>(Option C)</strong></li>\n<li>Anti LKM- 3 (Hepatitis D)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histopathology</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Interface <span class=\"customMeta\" data-dictid=\"39867f177b16927771888cf43850d5\">hepatitis</span> with a <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cell-rich infiltrate.</li>\n<li>Foci of necrosis, <span class=\"customMeta\" data-dictid=\"0d20ef4049169277718261e9075cbc\">ballooning</span> <span class=\"customMeta\" data-dictid=\"df4f1758e2169277718697ae66f3dd\">degeneration</span> of hepatocytes, and regenerative changes such as <span class=\"customMeta\" data-dictid=\"d92a2c1a2f1692777188848354f32b\">hepatocyte</span> <span class=\"customMeta\" data-dictid=\"a6b5099a6d1692777197fe12ae2fd5\">rosette</span> formation.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male with diabetes mellitus presents with fatigue and abdominal discomfort. He denies any history of alcohol consumption. Laboratory tests show elevated serum AST and ALT levels. Imaging reveals hepatic steatosis. Which of the following is consistent with the patient's presentation?", "options": [{"label": "A", "text": "AST/ALT &gt; 2 with obesity", "correct": false}, {"label": "B", "text": "AST/ALT &gt; 2 without alcohol intake", "correct": false}, {"label": "C", "text": "AST/ALT &lt; 1 with diabetes mellitus", "correct": true}, {"label": "D", "text": "AST/ALT &lt; 1 without dyslipidemia", "correct": false}], "correct_answer": "C. AST/ALT < 1 with diabetes mellitus", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>NASH</strong></p>\n<p><strong>(Non-alcoholic steatohepatitis)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alcoholic steatohepatitis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Obesity </p>\n<p>Diabetes mellitus <strong>(Option C)</strong></p>\n<p>Dyslipidemia <strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Alcohol intake</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>AST/ALT Ratio</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AST/ALT < 1 <strong>(Option A and B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AST/ALT > 2</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>GGT levels</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following changes is reversible with alcohol abstinence?", "options": [{"label": "A", "text": "Perivenular fibrosis", "correct": true}, {"label": "B", "text": "Periportal fibrosis", "correct": false}, {"label": "C", "text": "Bridging fibrosis", "correct": false}, {"label": "D", "text": "Micronodular cirrhosis", "correct": false}], "correct_answer": "A. Perivenular fibrosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/6vLAeaOVTBIa6uv4WCvR1736911986.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions is not typically associated with Mallory-Denk bodies?", "options": [{"label": "A", "text": "Wilson’s Disease", "correct": false}, {"label": "B", "text": "Hemochromatosis", "correct": true}, {"label": "C", "text": "Indian childhood cirrhosis", "correct": false}, {"label": "D", "text": "Alpha-1 antitrypsin deficiency", "correct": false}], "correct_answer": "B. Hemochromatosis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 51-year-old male with a history of chronic alcohol use presents with fatigue, abdominal discomfort, and unintentional weight loss. A biopsy of the liver was done. Which of the following histopathological features is characteristic of the condition depicted in the biopsy image?", "options": [{"label": "A", "text": "Mallory-Denk bodies", "correct": true}, {"label": "B", "text": "Ground-glass hepatocytes", "correct": false}, {"label": "C", "text": "Councilman bodies", "correct": false}, {"label": "D", "text": "Glycogenated hepatocytes", "correct": false}], "correct_answer": "A. Mallory-Denk bodies", "question_images": ["https://image.prepladder.com/content/UTy7Rsv8ZLpbEXNhpFIz1736912517.png"], "explanation_images": ["https://image.prepladder.com/content/iQWiWUwg5qujPcQvAJyS1736912549.png", "https://image.prepladder.com/content/suUf6Ku443ETreEJ94y91736912426.png", "https://image.prepladder.com/content/un7OlUcss1RE9tooACNY1736912746.png", "https://image.prepladder.com/content/GYKfQvgkCiisMx3zUQU91736912682.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2OkIHkcUkDLQZhCT0dPH1746472180.mp3", "video": ""}, {"text": "A 60-year-old male presents with abdominal distension and jaundice. Examination reveals hepatosplenomegaly. Lab tests show elevated liver enzymes and decreased albumin levels. Imaging shows nodules &lt;3mm throughout the liver. Which of the following conditions can present with these findings?", "options": [{"label": "A", "text": "Viral hepatitis", "correct": false}, {"label": "B", "text": "Drug-induced hepatitis", "correct": false}, {"label": "C", "text": "Hemochromatosis", "correct": true}, {"label": "D", "text": "Wilson disease", "correct": false}], "correct_answer": "C. Hemochromatosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/BM3tgtCfs8d2eksbhvNY1737605513.png", "https://image.prepladder.com/notes/6XtVz8eVKRndWRyLwlz51737605533.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:669px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Causes of <span class=\"customMeta\" data-dictid=\"d1067dfbcb1692777192b85600f542\">micronodular</span> cirrhosis</strong><br/>\n\t\t\t(Granule size <3mm)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Causes of <span class=\"customMeta\" data-dictid=\"866d89cd5516927771916d5134111d\">macronodular</span> cirrhosis</strong><br/>\n\t\t\t(Granule size >3mm)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Early stage of <span class=\"customMeta\" data-dictid=\"0751b802aa169277718100e38a1276\">Alcoholic</span> Liver Disease (ALD)</li>\n<li>Indian Childhood <span class=\"customMeta\" data-dictid=\"3e6e56aa3b1692777184226d2104e4\">Cirrhosis</span> (ICC)</li>\n<li>Primary <span class=\"customMeta\" data-dictid=\"7dd6eda7ce169277718325f22de9e8\">Biliary</span> <span class=\"customMeta\" data-dictid=\"3e6e56aa3b1692777184226d2104e4\">Cirrhosis</span> (PBC)</li>\n<li>Hemochromatosis <strong>(Option C)</strong></li>\n<li>Hepatic <span class=\"customMeta\" data-dictid=\"96e7e3fecc16927772018cb9f8c8cd\">venous</span> outflow <span class=\"customMeta\" data-dictid=\"39f44b27bf169277719416f29a74ee\">obstruction</span> (Budd-Chiari syndrome)</li>\n</ol>\n<p style=\"text-align:center\"><img alt=\"micronodular cirrhosis\" data-author=\"Amadalvarez\" data-hash=\"808\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Cirrosi_micronodular.1427.jpg\" data-tags=\"January2025\" height=\"220\" src=\"https://image.prepladder.com/notes/BM3tgtCfs8d2eksbhvNY1737605513.png\" width=\"275\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ol>\n<li>Late stage of <span class=\"customMeta\" data-dictid=\"0751b802aa169277718100e38a1276\">alcoholic</span> liver disease (ALD)</li>\n<li>Viral hepatitis<strong> (Option A)</strong></li>\n<li>Wilson disease<strong> </strong><strong>(Option D)</strong></li>\n<li>Drug-induced <span class=\"customMeta\" data-dictid=\"39867f177b16927771888cf43850d5\">hepatitis</span> <strong>(Option B)</strong></li>\n<li>Alpha-1 antitrypsin deficiency</li>\n</ol>\n\t\t\t \n\n\t\t\t<p style=\"text-align:center\"><img alt=\"Macronodular cirrhosis\" data-author=\"Eiman Ghaffarpasand.\" data-hash=\"809\" data-license=\"CC BY SA\" data-source=\"https://www.wikidoc.org/index.php/File:Fig78x.jpg\" data-tags=\"January2025\" height=\"192\" src=\"https://image.prepladder.com/notes/6XtVz8eVKRndWRyLwlz51737605533.png\" width=\"253\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which cells are primarily involved in the fibrosis in liver cirrhosis?", "options": [{"label": "A", "text": "Kupffer cells", "correct": false}, {"label": "B", "text": "Pit cells", "correct": false}, {"label": "C", "text": "Stellate cells", "correct": true}, {"label": "D", "text": "Hepatocytes", "correct": false}], "correct_answer": "C. Stellate cells", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following stains would be most useful for highlighting collagen deposition in the fibrotic areas of the liver?", "options": [{"label": "A", "text": "Periodic acid-Schiff (PAS) stain", "correct": false}, {"label": "B", "text": "Masson's trichrome stain", "correct": true}, {"label": "C", "text": "Masson's fontana stain", "correct": false}, {"label": "D", "text": "Congo red stain", "correct": false}], "correct_answer": "B. Masson's trichrome stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/VUV50QRmRxlEXsDUL0Dx1736912934.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which type of collagen is predominantly involved in the fibrotic process of cirrhosis?", "options": [{"label": "A", "text": "Collagen Type I and III", "correct": true}, {"label": "B", "text": "Collagen Type I and IV", "correct": false}, {"label": "C", "text": "Collagen Type II and III", "correct": false}, {"label": "D", "text": "Collagen Type II and IV", "correct": false}], "correct_answer": "A. Collagen Type I and III", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with fatigue, pruritus, and jaundice. He has a history of ulcerative colitis. Laboratory tests reveal elevated liver enzymes and conjugated hyperbilirubinemia. MRCP and Histopathological findings from liver biopsy are given below. Which condition is most likely responsible for these findings?", "options": [{"label": "A", "text": "Clonorchis/Opisthorchis infection", "correct": false}, {"label": "B", "text": "Primary Biliary Cholangitis", "correct": false}, {"label": "C", "text": "Primary Sclerosing Cholangitis", "correct": true}, {"label": "D", "text": "Biliary stone obstruction", "correct": false}], "correct_answer": "C. Primary Sclerosing Cholangitis", "question_images": ["https://image.prepladder.com/content/RyOJDQe97sDj4ucM3RcS1736913637.png", "https://image.prepladder.com/content/WbWo1cEZ0IPrDZhSsUHv1736915016.png"], "explanation_images": ["https://image.prepladder.com/content/UaAObx57qSZ8iAQKSHpq1736915035.png", "https://image.prepladder.com/content/Tur6WiN9Q37n8cwNWNMr1736915085.png", "https://image.prepladder.com/content/8iqxR3XID1KGFVMLTjjW1736913651.png"], "explanation": "<table cellspacing=\"0\" style=\"width:642px\">\n<tbody>\n<tr>\n<td style=\"border-color:#000000; border-style:solid\">\n<p><strong>Primary <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> <span class=\"customMeta\" data-dictid=\"dd9fbecbed1692777184ab44e1624c\">cholangitis</span> (PSC)</strong><br/>\n\t\t\t </p>\n</td>\n<td style=\"border-color:#000000; border-style:solid\">\n<p><strong>Primary <span class=\"customMeta\" data-dictid=\"7dd6eda7ce169277718325f22de9e8\">biliary</span> <span class=\"customMeta\" data-dictid=\"dd9fbecbed1692777184ab44e1624c\">cholangitis</span> or</strong><br/>\n<strong>Primary <span class=\"customMeta\" data-dictid=\"7dd6eda7ce169277718325f22de9e8\">biliary</span> <span class=\"customMeta\" data-dictid=\"3e6e56aa3b1692777184226d2104e4\">cirrhosis</span> (PBC)</strong><br/>\n<strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>Seen in 30 years old; M>F</p>\n</td>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>Seen in >50 years old; F>M</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>p-ANCA positive</p>\n<p>p-ANCA is also seen in</p>\n<ul>\n<li>Microscopic polyangitis</li>\n<li>Churg Strauss syndrome</li>\n<li>Ulcerative colitis</li>\n<li>Primary <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> cholangitis</li>\n<li>Goodpasture syndrome</li>\n<li>Pauci-immune glomerulonephritis</li>\n<li>Rheumatoid arthritis</li>\n</ul>\n</td>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>AMA(Anti-mitochondrial antibody) and ANA(anti-nuclear antibody) positive</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>Associated with <span class=\"customMeta\" data-dictid=\"b118cf61a016927772018a179057ef\">ulcerative</span> colitis, HLA-B8</p>\n</td>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>Associated with Sjogren syndrome, scleroderma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>Intrahepatic and <span class=\"customMeta\" data-dictid=\"85d0636fae1692777187fc93c80934\">extrahepatic</span> <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> ducts are affected</p>\n</td>\n<td style=\"border-color:#000000; border-style:solid\">\n<p>Intrahepatic <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> ducts affected</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid\">\n<p><strong>HPE:</strong> <span class=\"customMeta\" data-dictid=\"9bb62139a81692777184648bfef564\">Concentric</span> <span class=\"customMeta\" data-dictid=\"b7e71e2acf1692777195087acd2271\">periductal</span> <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> (Onion skin fibrosis)</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Joy Worthington\" data-hash=\"\" data-license=\"CC BY SA 2.0\" data-source=\"https://www.researchgate.net/figure/Histological-features-of-primary-sclerosing-cholangitis_fig2_6734216\" data-tags=\"\" height=\"235\" src=\"https://image.prepladder.com/content/UaAObx57qSZ8iAQKSHpq1736915035.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-color:#000000; border-style:solid\"> \n\t\t\t<p style=\"text-align:center\"><img alt=\"\" data-author=\"Samantha Sarcognato,Diana Sacchi,Federica Grillo,Nora Cazzagon\" data-hash=\"\" data-license=\"CC BY-NC-ND 4.0\" data-source=\"https://www.researchgate.net/figure/A-florid-duct-lesion-in-a-primary-biliary-cholangitis-patient-A-chronic-inflammatory_fig1_353137625\" data-tags=\"\" height=\"226\" src=\"https://image.prepladder.com/content/Tur6WiN9Q37n8cwNWNMr1736915085.png\" width=\"300\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-color:#000000; border-style:solid\">\n<p><strong>Radiology:</strong> Pruning of small <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> ducts; Strictures and <span class=\"customMeta\" data-dictid=\"965fde0a5a1692777182ae7e8ede4b\">beading</span> of large <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> ducts.</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Joy Worthington, Roger Chapman\" data-hash=\"\" data-license=\"CC BY 2.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Cholangiogram_of_primary_sclerosing_cholangitis.jpg\" data-tags=\"\" height=\"300\" src=\"https://image.prepladder.com/content/8iqxR3XID1KGFVMLTjjW1736913651.png\" width=\"300\"/></p>\n<p> </p>\n</td>\n<td style=\"border-color:#000000; border-style:solid\">\n<p><strong>Radiology:</strong> Normal</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/ifl7GaGyfnOyuZ2Vl3jZ1747670819.mp3", "video": ""}, {"text": "A 35-year-old male presents with chronic jaundice and mild abdominal discomfort. Examination revealed hepatomegaly. Lab tests indicate elevated levels of direct bilirubin. Upon liver biopsy, a pigmented liver is observed. What is the most likely underlying mechanism for these clinical and pathological findings?", "options": [{"label": "A", "text": "Deficiency of UDP glucuronosyl transferase (UGT)", "correct": false}, {"label": "B", "text": "OATP transporter defect", "correct": false}, {"label": "C", "text": "MRP2 (Multidrug resistance-associated protein 2) defect", "correct": true}, {"label": "D", "text": "Deficiency of biliverdin reductase", "correct": false}], "correct_answer": "C. MRP2 (Multidrug resistance-associated protein 2) defect", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:650px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type of hyperbilirubinemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disorder</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defect</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Unconjugated hyperbilirubinemia </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Crigler-Najjar syndrome type 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Complete <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT. <strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Crigler-Najjar syndrome type 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Partial <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gilbert syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Very mild <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT.</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Conjugated hyperbilirubinemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dubin Johnson syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defect in canalicular MRP2 protein. <strong>(Option C)</strong></p>\n\t\t\t \n\n\t\t\t<p><strong>Pigmented</strong> <strong>liver</strong> (due to <span class=\"customMeta\" data-dictid=\"76baf6616a169277718738f8790ab9\">epinephrine</span> metabolite)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rotor syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defect in ATPs (decreased <span class=\"customMeta\" data-dictid=\"7dd6eda7ce169277718325f22de9e8\">biliary</span> excretion)</p>\n\t\t\t \n\n\t\t\t<p>Non-pigmented liver</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 2-week-old infant presents with persistent jaundice since birth and markedly elevated unconjugated bilirubin levels (&gt;20 mg/dL) despite exposure to sunlight. Genetic testing confirms homozygosity for a specific mutation. What is the likely diagnosis?", "options": [{"label": "A", "text": "Criggler-Najjar syndrome type 1", "correct": true}, {"label": "B", "text": "Criggler-Najjar syndrome type 2", "correct": false}, {"label": "C", "text": "Gilbert syndrome", "correct": false}, {"label": "D", "text": "Rotor syndrome", "correct": false}], "correct_answer": "A. Criggler-Najjar syndrome type 1", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:670px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Syndromes of Unconjugated hyperbilirubinemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disorder</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Severity of Unconjugated hyperbilirubinemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Crigler-Najjar syndrome <span class=\"customMeta\" data-dictid=\"ebcb7136251692777201ef4b5c5718\">type 1</span> (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Complete <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Crigler-Najjar syndrome <span class=\"customMeta\" data-dictid=\"05e8c1df0d1692777201c9acee8b1f\">type 2</span> (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Partial <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild to moderate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gilbert syndrome (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Very mild <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild, asymptomatic</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Syndromes of Conjugated hyperbilirubinemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disorder </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defect </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gross Feature of liver </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dubin Johnson syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defect in canalicular MRP2 protein.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pigmented liver (due to <span class=\"customMeta\" data-dictid=\"76baf6616a169277718738f8790ab9\">epinephrine</span> metabolite)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rotor syndrome (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defect in ATPs (decreased <span class=\"customMeta\" data-dictid=\"7dd6eda7ce169277718325f22de9e8\">biliary</span> excretion)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non <span class=\"customMeta\" data-dictid=\"85dafbf32f1692777195b9d9f035d8\">pigmented</span> liver</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which change can be seen in a structure that connects hepatocytes with cholangiocytes?", "options": [{"label": "A", "text": "Liver regeneration", "correct": true}, {"label": "B", "text": "Amyloid deposition", "correct": false}, {"label": "C", "text": "Bile synthesis", "correct": false}, {"label": "D", "text": "Fibrosis", "correct": false}], "correct_answer": "A. Liver regeneration", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which zone of the liver lobule is primarily affected by toxins and drug metabolism?", "options": [{"label": "A", "text": "Zone 1 (periportal zone)", "correct": false}, {"label": "B", "text": "Zone 2 (midzonal zone)", "correct": false}, {"label": "C", "text": "Zone 3 (perivenous zone)", "correct": true}, {"label": "D", "text": "Zone 4 (pericentral zone)", "correct": false}], "correct_answer": "C. Zone 3 (perivenous zone)", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/FPpT226EtoxrbFfqSE9M1743675623.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:689px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Zone</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hepatocyte characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Sensitivity to Injury</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Zone 1 </strong><br/>\n<strong>(periportal zone)</strong><br/>\n<strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Around the <span class=\"customMeta\" data-dictid=\"a74252404f1692777196d3f24bde2d\">portal</span> tracts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High oxygenation, <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> activity,<br/>\n\t\t\tRich blood supply</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">Least susceptibile to toxin-mediated and ischemic injury</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Zone 2 </strong><br/>\n<strong>(mid zonal zone)</strong><br/>\n<strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Between zone 1 and zone 3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Intermediate oxygenation, <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> activity and blood supply</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Moderate <span class=\"customMeta\" data-dictid=\"6ced8252211692777199ab0cc3f2bb\">susceptibility</span> to toxin-mediated and ischemic injury</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Zone 3 (perivenous zone/ <span class=\"customMeta\" data-dictid=\"2ea4d3f8a216927771959755021afc\">pericentral</span> zone)</strong><br/>\n<strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Around the central vein</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low oxygenation,<br/>\n\t\t\tactive metabolism,<br/>\n\t\t\tPoor blood supply</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Susceptible to drugs/toxin-mediated damage and ischemic injury during <span class=\"customMeta\" data-dictid=\"010244d02d16927771899680e97489\">hypoperfusion</span> of the liver</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following cytokines is not typically involved in promoting fibrogenesis and hepatic stellate cell activation in chronic liver diseases?", "options": [{"label": "A", "text": "Interleukin-6 (IL-6)", "correct": false}, {"label": "B", "text": "Platelet-Derived Growth Factor (PDGF)", "correct": false}, {"label": "C", "text": "Interleukin-10 (IL-10)", "correct": true}, {"label": "D", "text": "Transforming Growth Factor Beta (TGF-β)", "correct": false}], "correct_answer": "C. Interleukin-10 (IL-10)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Factors </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Role in <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> <span class=\"customMeta\" data-dictid=\"54e0888a6616927771945a99208287\">pathology</span> </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Interleukin 10 (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Antiinflammatory</strong></li>\n<li><strong>Inhibits <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> stellar cell activation</strong></li>\n<li>Reduces <span class=\"customMeta\" data-dictid=\"78a4b71f181692777202494549544c\">fibrogenesis</span> by counteracting pro-inflammatory cytokines</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Interleukin 6 (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pro-inflammatory</li>\n<li>Stimulates <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> stellar cell activation</li>\n<li>Promotes <span class=\"customMeta\" data-dictid=\"78a4b71f181692777202494549544c\">fibrogenesis</span> and <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> in chronic liver diseases</li>\n<li>Associated with <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> regeneration</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Platelet derived growth factor (PDGF) (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Stimulates <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> stellar cell activation</li>\n<li>Promotes <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> and migration of <span class=\"customMeta\" data-dictid=\"31f3475bb416927771894ea8f40643\">HSC</span> to site of injury</li>\n<li>Contributes to fibrogenesis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Transforming growth factor - β (TGF-β) (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Promotes profibrotic cytokines in liver diseases</li>\n<li>Stimulates <span class=\"customMeta\" data-dictid=\"31f3475bb416927771894ea8f40643\">HSC</span> <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> and transformation into myofibroblast</li>\n<li>Enhances <span class=\"customMeta\" data-dictid=\"ba366417791692777187229d34e597\">Extracellular</span> <span class=\"customMeta\" data-dictid=\"14958c535b1692777192abd2a85abf\">Matrix</span> production and inhibits <span class=\"customMeta\" data-dictid=\"cc804137e416927771867467b03daa\">ECM</span> degradation</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 28 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following mutations is responsible for hereditary haemochromatosis?", "options": [{"label": "A", "text": "ATP7B mutation", "correct": false}, {"label": "B", "text": "HFE mutation", "correct": true}, {"label": "C", "text": "SERPINA 1 mutation", "correct": false}, {"label": "D", "text": "UGT1A1 mutation", "correct": false}], "correct_answer": "B. HFE mutation", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/VVy9isz0XqvSpJ7nDhYG1736915388.png", "https://image.prepladder.com/content/aVltz2QLvHe6OPbNhWp41736915525.png", "https://image.prepladder.com/content/Zqgcujd96SYDg6Ms8WBS1736915464.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gene defects </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hemochomatosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HFE gene</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Wilson’s disease</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ATP7B gene</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gilbert syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>UGT1A1 gene</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>α1-Antitrypsin deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>SERPINA 1 gene</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 48-year-old man comes to the OPD with complaints of excessive thirst, excessive micturition, and increased hunger. He also states that his skin colour has changed in the past six months. He is icteric on examination, and his skin examination reveals findings similar to those in the image below. What is the most likely cause of the change in his skin colour?", "options": [{"label": "A", "text": "Excessive melanin production due to adrenal insufficiency", "correct": false}, {"label": "B", "text": "Excessive deposition of melanin and iron in the skin", "correct": true}, {"label": "C", "text": "Insulin resistance", "correct": false}, {"label": "D", "text": "Excessive deposition of bilirubin in the skin", "correct": false}], "correct_answer": "B. Excessive deposition of melanin and iron in the skin", "question_images": ["https://image.prepladder.com/content/QkPB4LjsgvgZOiLTrV4l1736916951.png"], "explanation_images": ["https://image.prepladder.com/content/B24sCYagWJHXD6542WIu1736917007.png", "https://image.prepladder.com/content/lq8FbWDVVkU0uPXpwtl61736917086.png", "https://image.prepladder.com/content/kMWpnBiV9jAfkFxBMQoB1736917108.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Organs affected </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Liver </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hepatomegaly, elevated liver enzymes, risk of HCC</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pancreas </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Iron <span class=\"customMeta\" data-dictid=\"f3063c1d8b169277719018bf869980\">induced</span> damage of <span class=\"customMeta\" data-dictid=\"806eb8418c16927771822855b56695\">beta</span> cells - diabetes mellitus</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Heart </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cardiomyopathy , arrhythmias, congestive heart failure</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Skin </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hyperpigmentation - <strong>bronze</strong> skin due to <span class=\"customMeta\" data-dictid=\"afe514c80616927771928d403a54fa\">melanin</span> and iron deposition</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Joints </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Arthropathy and joint pain</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CNS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rarely - memory issues, depression and fatigue</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types of <span class=\"customMeta\" data-dictid=\"558e2213a916927771883c4b724e1a\">hemochromatosis</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hereditary hemochromatosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HFE</strong>-related: It is the classic <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of <span class=\"customMeta\" data-dictid=\"ee5175c06116927771880846d1cbe0\">hereditary</span> <span class=\"customMeta\" data-dictid=\"558e2213a916927771883c4b724e1a\">hemochromatosis</span> that is inherited in an autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> (chromosome 6p)</p>\n<p><strong>HAMP</strong> gene mutation-related</p>\n<p><strong>HJV</strong> gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> (juvenile hemochromatosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acquired/secondary hemochromatosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Repeated blood transfusions</p>\n<p>Excessive oral <span class=\"customMeta\" data-dictid=\"6cdcd39cf2169277719068e247e38d\">intake</span> or iron</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 38-year-old female presents with fatigue, joint pain, and bronze skin pigmentation. Labs show a heterozygous mutation in the HFE gene. The histopathology image is shown below. Which of the following is the best screening test for this condition?", "options": [{"label": "A", "text": "Serum ferritin level", "correct": false}, {"label": "B", "text": "Transferrin saturation", "correct": true}, {"label": "C", "text": "Liver function tests", "correct": false}, {"label": "D", "text": "Genetic testing for the HFE gene", "correct": false}], "correct_answer": "B. Transferrin saturation", "question_images": ["https://image.prepladder.com/notes/O5aUWNu2QpMZPC3z0ab31737613036.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old patient presents with a history of tremors, dysarthria, and personality changes. Serum ceruloplasmin levels were found to be low. Based on the image below, what ocular finding is associated with the underlying condition?", "options": [{"label": "A", "text": "Arcus senilis", "correct": false}, {"label": "B", "text": "Kayser-Fleischer rings", "correct": true}, {"label": "C", "text": "Roth spots", "correct": false}, {"label": "D", "text": "Horner's syndrome", "correct": false}], "correct_answer": "B. Kayser-Fleischer rings", "question_images": ["https://image.prepladder.com/content/e0petdjBIvw6KSIzv9vW1736917224.png"], "explanation_images": ["https://image.prepladder.com/content/4yRbJZ5WaVEAR4ZCV40Q1739422440.png", "https://image.prepladder.com/content/GYKUbkpewH7C0KAcwchN1739422397.png", "https://image.prepladder.com/content/mxLglDWwHZDvaTu9D2GB1739422277.png", "https://image.prepladder.com/content/cyRFi2Ktyo34JvXHeVKR1739422366.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following tests is the most specific for confirming the diagnosis of Wilson’s Disease?", "options": [{"label": "A", "text": "Serum Ceruloplasmin", "correct": false}, {"label": "B", "text": "Urinary excretion of copper", "correct": false}, {"label": "C", "text": "Serum copper levels", "correct": false}, {"label": "D", "text": "Liver Biopsy", "correct": true}], "correct_answer": "D. Liver Biopsy", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which special stain is commonly used to aid in the diagnosis of Wilson's disease?", "options": [{"label": "A", "text": "Oil Red O stain", "correct": false}, {"label": "B", "text": "Periodic acid-Schiff (PAS) stain", "correct": false}, {"label": "C", "text": "Rubeanic acid stain", "correct": true}, {"label": "D", "text": "Prussian blue stain", "correct": false}], "correct_answer": "C. Rubeanic acid stain", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/f6HDKTStUkRr997LCHoP1736917290.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:749px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rubeanic acid stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stains the <span class=\"customMeta\" data-dictid=\"7b5fb2b56416927771858f02fd5508\">copper</span> present within cytosolic granules of hepatocytes</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Oil red O <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stains lipids<strong> (Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PAS <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stains cells with high <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">glycogen</span> storage and also stains basement <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> <strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prussian <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stains <span class=\"customMeta\" data-dictid=\"244b573f9d169277718887b033ba57\">hemosiderin</span> / stored iron <strong>(Option D)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old male presents with a history of chronic alcohol abuse and complains of right upper quadrant abdominal pain. On examination, hepatomegaly is noted. Laboratory investigations show elevated liver enzymes. Gross feature of the liver has a characteristic mottled appearance. Based on these findings and the image below, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Cirrhosis", "correct": false}, {"label": "B", "text": "Hepatitis", "correct": false}, {"label": "C", "text": "Nutmeg Liver", "correct": true}, {"label": "D", "text": "Liver Abscess", "correct": false}], "correct_answer": "C. Nutmeg Liver", "question_images": ["https://image.prepladder.com/content/XP0x84N20PyUh9TPX3fk1736917489.png"], "explanation_images": ["https://image.prepladder.com/content/kdjZ92H0s3Dp6Ym54PhD1736917369.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old female presents with fatigue, jaundice, and abdominal pain. On examination, hepatomegaly is noted. Hepatocytes show globular inclusions which are strongly periodic acid–Schiff (PAS)-positive. Her sibling died of the same liver condition a few years back. What is the primary function of the enzyme implicated in this condition?", "options": [{"label": "A", "text": "Inhibits neutrophil elastase", "correct": true}, {"label": "B", "text": "Stimulates neutrophil elastase", "correct": false}, {"label": "C", "text": "Stimulates matrix metalloproteinase activity", "correct": false}, {"label": "D", "text": "Regulates aminotransferase activity", "correct": false}], "correct_answer": "A. Inhibits neutrophil elastase", "question_images": ["https://image.prepladder.com/content/rzfl8PveDvkJblVLCsbT1736917567.png"], "explanation_images": ["https://image.prepladder.com/content/Rs3x70PnOaG8caiuqJCu1736917598.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/K474LIDoRYTCIc3HMTR41740664900.mp3", "video": ""}, {"text": "A 50-year-old patient with a history of recurrent biliary colic and cholangitis undergoes cholecystectomy. Multiple stones are retrieved intraoperatively, and an image of the stones is provided for reference. Which of the following is true about the type of pigmented stones likely seen in this patient?", "options": [{"label": "A", "text": "Predominantly found in western populations", "correct": false}, {"label": "B", "text": "Associated with metabolic syndrome", "correct": false}, {"label": "C", "text": "Found in sterile bile", "correct": true}, {"label": "D", "text": "Seen in infected large bile ducts", "correct": false}], "correct_answer": "C. Found in sterile bile", "question_images": ["https://image.prepladder.com/content/IPeGH7gOb4vQXvYNGxT31736917660.png"], "explanation_images": ["https://image.prepladder.com/content/K8rPb1w0NP33SsUaZfTD1736917711.png", "https://image.prepladder.com/content/5etZpd4n117usycaVuDB1736917671.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cholesterol Stones</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pigment Stones</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Predisposing conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in <strong>Western populations (Option A)</strong>, related to <strong>metabolic syndrome (Option B)</strong>, <span class=\"customMeta\" data-dictid=\"c5ff3f2d211692777194ddf14e24c4\">obesity</span> and common in <strong>females</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"d30ae941d516927771889351160b00\">hemolytic</span> anaemia - <strong>Black stones</strong></p>\n<p>Bacterial infections, <span class=\"customMeta\" data-dictid=\"c0433f52ad1692777194c2ffb6fc63\">parasitic</span> infestations - <strong>Brown stones</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Composition</strong><strong> </strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>>50% <span class=\"customMeta\" data-dictid=\"35b1a3c6191692777185a1e2376fc0\">crystalline</span> cholesterol monohydrate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Calcium salts of unconjugated <span class=\"customMeta\" data-dictid=\"2d60c5a677169277718325a811dcf1\">bilirubin</span> and <span class=\"customMeta\" data-dictid=\"fae9d02cdc1692777190a3151d6fef\">inorganic</span> <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> salts</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pale yellow, round to ovoid, granular, hard external surface</p>\n<p><br/>\n\t\t\t </p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Alex Khimich\" data-hash=\"\" data-license=\"OPEN ACESS\" data-source=\"https://en.wikipedia.org/wiki/Gallstone#/media/File:Gallstones.JPG\" data-tags=\"\" height=\"176\" src=\"https://image.prepladder.com/content/K8rPb1w0NP33SsUaZfTD1736917711.png\" width=\"300\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Brown to black, soft, soap-like, <span class=\"customMeta\" data-dictid=\"d9873d32e01692777199c6a1f6ecfc\">spiculated</span> or moulded contours</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Emmanuelm\" data-hash=\"\" data-license=\"CC BY 3.0\" data-source=\"https://en.wikipedia.org/wiki/Gallstone#/media/File:Gallstones.jpg\" data-tags=\"\" height=\"185\" src=\"https://image.prepladder.com/content/5etZpd4n117usycaVuDB1736917671.png\" width=\"300\"/></p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Arise exclusively in the gallbladder</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Found in <span class=\"customMeta\" data-dictid=\"fc3d080799169277719904701c07f9\">sterile</span> <span class=\"customMeta\" data-dictid=\"1f51bf91811692777188d929c8e851\">gallbladder</span> <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> <strong>(black stones)</strong> or<br/>\n\t\t\tinfected large <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> ducts <strong>(brown stones) (Options C and D).</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Radiopacity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Radiolucent (may become <span class=\"customMeta\" data-dictid=\"76584c702f1692777197ee90a74461\">radiopaque</span> with <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> carbonate)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Black stones: 50-75% are radiopaque,<br/>\n\t\t\tBrown stones: Radiolucent</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All the following infections are associated with an increased risk of pigmented gallstones, except?", "options": [{"label": "A", "text": "Escherichia coli", "correct": false}, {"label": "B", "text": "Ascaris lumbricoides", "correct": false}, {"label": "C", "text": "Clonorchis sinensis", "correct": false}, {"label": "D", "text": "Aspergillus flavus", "correct": true}], "correct_answer": "D. Aspergillus flavus", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions is not a complication associated with gallstones?", "options": [{"label": "A", "text": "Acute pancreatitis", "correct": false}, {"label": "B", "text": "Gall bladder carcinoma", "correct": false}, {"label": "C", "text": "Bouveret syndrome", "correct": false}, {"label": "D", "text": "Budd-Chiari syndrome", "correct": true}], "correct_answer": "D. Budd-Chiari syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient presents to the OPD with severe right upper quadrant pain radiating to the right shoulder, accompanied by nausea and vomiting. Clinical examination revealed a positive result for a clinical test shown in the image down below. An ultrasound of the abdomen shows an enlarged and tense gallbladder. Which of the following findings is most likely associated with this patient's condition?", "options": [{"label": "A", "text": "Xanthogranulomatous cholecystitis", "correct": false}, {"label": "B", "text": "Rokitansky-Aschoff sinuses", "correct": false}, {"label": "C", "text": "Subserosal fibrosis", "correct": false}, {"label": "D", "text": "Subserosal haemorrhages", "correct": true}], "correct_answer": "D. Subserosal haemorrhages", "question_images": ["https://image.prepladder.com/content/ENPqyS8OVmDamo1Ff0Nu1739422142.png"], "explanation_images": ["https://image.prepladder.com/content/gMZMCtb6BnQMFWEojexr1736917869.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:706px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute cholecystitis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic cholecystitis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gall <span class=\"customMeta\" data-dictid=\"e6cfda323816927771839cc83e376d\">bladder</span> appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thickened, tense, edematous, bright red or green-black</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thickened, fibrotic, <span class=\"customMeta\" data-dictid=\"1b8aa0db391692777194178f73c98c\">opaque</span> grey-white</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serosa</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Subserosal haemorrhages (Option D)</strong>, <span class=\"customMeta\" data-dictid=\"862ea1578b1692777202175f8f7396\">fibrinopurulent</span> exudate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Smooth <span class=\"customMeta\" data-dictid=\"8fc2f5e23316927771989ab10ac305\">serosa</span> with <strong>Subserosal fibrosis</strong> <strong>(Option C)</strong><br/>\n\t\t\t(subepithelial <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> also seen)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Erosion of mucosa, Edema, congestion, sparse neutrophils</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Scattered lymphocytes, <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells, macrophages, fibrosis, <strong>Rokitansky-Aschoff sinuses (Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Special forms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gallbladder <span class=\"customMeta\" data-dictid=\"cfa3ed6a1b1692777187669bb2c495\">empyema</span> (pure pus), gangrenous cholecystitis, emphysematous cholecystitis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Porcelain gallbladder, adenomyomatosis, <strong>Xanthogranulomatous <span class=\"customMeta\" data-dictid=\"180ce1a7c416927771844825c616f4\">cholecystitis</span> (Option A)</strong>, IgG4-related <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">sclerosing</span> cholecystitis, <span class=\"customMeta\" data-dictid=\"7b09c2b34916927771896ff30fcaa0\">hydrops</span> of the gallbladder</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which condition is characterised by extensive dystrophic calcification of the gallbladder wall?", "options": [{"label": "A", "text": "Porcelain gallbladder", "correct": true}, {"label": "B", "text": "Gangrenous cholecystitis", "correct": false}, {"label": "C", "text": "Acute cholecystitis", "correct": false}, {"label": "D", "text": "Hyalinizing cholecystitis", "correct": false}], "correct_answer": "A. Porcelain gallbladder", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/DkJgEdahezrQwQc5eZiy1739422022.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:648px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Porcelain <span class=\"customMeta\" data-dictid=\"1f51bf91811692777188d929c8e851\">gallbladder</span> (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hyalinizing <span class=\"customMeta\" data-dictid=\"180ce1a7c416927771844825c616f4\">cholecystitis</span> (Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Characterized by extensive dystrophic <span class=\"customMeta\" data-dictid=\"a1ee14c673169277718351bfe6afd4\">calcification</span> of the <span class=\"customMeta\" data-dictid=\"1f51bf91811692777188d929c8e851\">gallbladder</span> wall.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Characterized by complete replacement of the <span class=\"customMeta\" data-dictid=\"1f51bf91811692777188d929c8e851\">gallbladder</span> wall and <span class=\"customMeta\" data-dictid=\"31ae8f4dc51692777193069d92be37\">mucosa</span> by dense fibrosis, with or without calcification.</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Associated with chronic <span class=\"customMeta\" data-dictid=\"180ce1a7c416927771844825c616f4\">cholecystitis</span> and an increased risk of <span class=\"customMeta\" data-dictid=\"1f51bf91811692777188d929c8e851\">gallbladder</span> carcinoma</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 23 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is associated with conjugated hyperbilirubinemia?", "options": [{"label": "A", "text": "Crigler Najar -1 syndrome", "correct": false}, {"label": "B", "text": "Crigler Najar -2 syndrome", "correct": false}, {"label": "C", "text": "Gilbert syndrome", "correct": false}, {"label": "D", "text": "Dubin-Johnson syndrome", "correct": true}], "correct_answer": "D. Dubin-Johnson syndrome", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Syndromes of Unconjugated hyperbilirubinemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disorder</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Severity of Unconjugated hyperbilirubinemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Crigler-Najjar syndrome type 1</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Complete <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Crigler-Najjar syndrome <span class=\"customMeta\" data-dictid=\"05e8c1df0d1692777201c9acee8b1f\">type 2</span> </strong></p>\n<p><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Partial <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild to moderate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gilbert syndrome</strong></p>\n<p><strong>(Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Very mild <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> of UGT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild, asymptomatic</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Syndromes of Conjugated hyperbilirubinemia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disorder </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Defect </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Gross Feature of liver </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dubin Johnson syndrome </strong></p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defect in <strong>canalicular MRP2 protein.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pigmented liver (due to <span class=\"customMeta\" data-dictid=\"76baf6616a169277718738f8790ab9\">epinephrine</span> metabolite).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rotor syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defective ATP-dependent <span class=\"customMeta\" data-dictid=\"7dd6eda7ce169277718325f22de9e8\">biliary</span> excretion.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Non-pigmented liver.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most common cause of liver failure ?", "options": [{"label": "A", "text": "Alcohol", "correct": false}, {"label": "B", "text": "Paracetamol", "correct": true}, {"label": "C", "text": "CCI4", "correct": false}, {"label": "D", "text": "Pesticides", "correct": false}], "correct_answer": "B. Paracetamol", "question_images": [], "explanation_images": [], "explanation": "\n<table>\n<thead>\n<tr>\n<td>\n<p><strong>Substance</strong></p>\n</td>\n<td>\n<p><strong>Mechanism of <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">Hepatic</span> Injury</strong></p>\n</td>\n<td>\n<p><strong>Examples</strong></p>\n</td>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n<p>Acetaminophen</p>\n</td>\n<td>\n<p>Metabolic <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> forms toxic metabolites</p>\n</td>\n<td>\n<p>Overdose of acetaminophen</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Alcohol</p>\n</td>\n<td>\n<p>Oxidative stress, mitochondrial dysfunction</p>\n</td>\n<td>\n<p>Chronic alcohol abuse</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Nonsteroidal anti-inflammatory drugs (NSAIDs)</p>\n</td>\n<td>\n<p>Hepatotoxicity due to idiosyncratic reactions</p>\n</td>\n<td>\n<p>Diclofenac, ibuprofen, naproxen</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Antituberculosis drugs</p>\n</td>\n<td>\n<p>Hepatocellular <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and cholestasis</p>\n</td>\n<td>\n<p>Isoniazid, rifampicin, pyrazinamide</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Statins</p>\n</td>\n<td>\n<p>Hepatocellular injury, cholestasis</p>\n</td>\n<td>\n<p>Atorvastatin, simvastatin</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Amiodarone</p>\n</td>\n<td>\n<p>Steatohepatitis, phospholipidosis</p>\n</td>\n<td>\n<p>Antiarrhythmic agent</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Methotrexate</p>\n</td>\n<td>\n<p>Hepatic fibrosis, steatosis</p>\n</td>\n<td>\n<p>Anticancer and <span class=\"customMeta\" data-dictid=\"c3c986cd721692777189b473814b2e\">immunosuppressive</span> agent</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Amanita phalloides (mushroom)</p>\n</td>\n<td>\n<p>Hepatocellular <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and liver failure</p>\n</td>\n<td>\n<p>Ingestion of poisonous mushroom</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Carbon tetrachloride</p>\n</td>\n<td>\n<p>Hepatocellular <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and fibrosis</p>\n</td>\n<td>\n<p>Industrial <span class=\"customMeta\" data-dictid=\"70b443547216927771982e533ec473\">solvent</span> and chemical</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Herbal supplements (e.g., kava, green tea extract)</p>\n</td>\n<td>\n<p>Hepatocellular injury, cholestasis</p>\n</td>\n<td>\n<p>Certain <span class=\"customMeta\" data-dictid=\"040570886616927771884f5b87b36c\">herbal</span> products</p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Macrophages play an important role in phagocytosis and chronic inflammation. Which of the following cells perform the same function in the liver?", "options": [{"label": "A", "text": "Hepatocytes", "correct": false}, {"label": "B", "text": "Merkel cells", "correct": false}, {"label": "C", "text": "Sinusoid all cells", "correct": false}, {"label": "D", "text": "Kupffer cells", "correct": true}], "correct_answer": "D. Kupffer cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/Igk4qdG6P5iyY35iQ5to1747986551.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is associated with hepatic angiosarcoma?", "options": [{"label": "A", "text": "Iron", "correct": false}, {"label": "B", "text": "Copper", "correct": false}, {"label": "C", "text": "Zinc", "correct": false}, {"label": "D", "text": "Arsenic", "correct": true}], "correct_answer": "D. Arsenic", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient with cirrhosis and ascites presented to you. The gross appearance of his liver is shown below. Which of the following is true about it?", "options": [{"label": "A", "text": "Dark areas represent necrosis, white areas represent viable liver", "correct": true}, {"label": "B", "text": "Dark areas represent viable liver tissue, white areas represent necrosis", "correct": false}, {"label": "C", "text": "White areas represent central hepatocytes", "correct": false}, {"label": "D", "text": "Dark areas represent peri-portal hepatocytes", "correct": false}], "correct_answer": "A. Dark areas represent necrosis, white areas represent viable liver", "question_images": ["https://image.prepladder.com/notes/tuW8Gue4gMjaEzHZphHe1747052895.jpg"], "explanation_images": ["https://image.prepladder.com/notes/yqWb1NMQtp62XogEIk6D1745313699.jpg", "https://image.prepladder.com/notes/1zjvnqgYV8iEBkzxrfQ41745313740.png", "https://image.prepladder.com/notes/5lmTIU2QjwllJxBhR7Sj1747052997.jpg"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old female presenting with an unsteady gait, forgetfulness, labile moods, and Kayser-Fleischer rings was diagnosed with Wilson’s disease. Which of the following options correctly indicates the gene mutated in this condition and its location?", "options": [{"label": "A", "text": "ATP7B gene on chromosome 13", "correct": true}, {"label": "B", "text": "ATP7A gene on chromosome 13", "correct": false}, {"label": "C", "text": "ATP7B gene on chromosome 17", "correct": false}, {"label": "D", "text": "ATP7A gene on chromosome 17", "correct": false}], "correct_answer": "A. ATP7B gene on chromosome 13", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/wlNxVmFnTZ6M1ajwpuRi1746082444.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the gene mutation seen in hemochromatosis?", "options": [{"label": "A", "text": "HFE", "correct": true}, {"label": "B", "text": "PTEN", "correct": false}, {"label": "C", "text": "ATP7B gene", "correct": false}, {"label": "D", "text": "MRP2 protein", "correct": false}], "correct_answer": "A. HFE", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/oJKO1xbdr2rRBLi7mDOo1745909674.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Organs affected </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Liver </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hepatomegaly, elevated liver enzymes, risk of HCC</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pancreas </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Iron-induced damage of <span class=\"customMeta\" data-dictid=\"806eb8418c16927771822855b56695\">beta</span> cells - diabetes mellitus</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Heart </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Cardiomyopathy, arrhythmias, congestive heart failure</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Skin </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hyperpigmentation (<strong>bronze</strong> skin due to <span class=\"customMeta\" data-dictid=\"afe514c80616927771928d403a54fa\">melanin</span> and iron deposition)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Joints </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Arthropathy and joint pain</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>CNS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Rarely - Memory issues, depression and fatigue</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Types of <span class=\"customMeta\" data-dictid=\"558e2213a916927771883c4b724e1a\">hemochromatosis</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Features </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hereditary <span class=\"customMeta\" data-dictid=\"558e2213a916927771883c4b724e1a\">hemochromatosis</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>HFE</strong>-related: It is the classic <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> of <span class=\"customMeta\" data-dictid=\"ee5175c06116927771880846d1cbe0\">hereditary</span> <span class=\"customMeta\" data-dictid=\"558e2213a916927771883c4b724e1a\">hemochromatosis</span> that is inherited in an autosomal <span class=\"customMeta\" data-dictid=\"d54db2110416927771971e7c011a9f\">recessive</span> (chromosome 6p)</li>\n<li><strong>HAMP</strong> gene mutation-related</li>\n<li><strong>HJV</strong> gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> (juvenile hemochromatosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Acquired/secondary <span class=\"customMeta\" data-dictid=\"558e2213a916927771883c4b724e1a\">hemochromatosis</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Repeated blood transfusion</li>\n<li>Excessive oral <span class=\"customMeta\" data-dictid=\"6cdcd39cf2169277719068e247e38d\">intake</span> or iron</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient suffering from cholelithiasis underwent cholecystectomy. The image of the specimen is shown below. Which of the following is the correct diagnosis?", "options": [{"label": "A", "text": "Cholesterolosis", "correct": false}, {"label": "B", "text": "Gallbladder polyp", "correct": true}, {"label": "C", "text": "Carcinoma gallbladder", "correct": false}, {"label": "D", "text": "Strawberry gallbladder", "correct": false}], "correct_answer": "B. Gallbladder polyp", "question_images": ["https://image.prepladder.com/notes/Icikm9i62aFGayP0bVQg1746707048.png"], "explanation_images": ["https://image.prepladder.com/notes/cmK0bO49huxGoZBKcspD1745393573.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following cells plays a key role in phagocytosis and chronic inflammation in the liver?", "options": [{"label": "A", "text": "Hepatocytes", "correct": false}, {"label": "B", "text": "Ito cells", "correct": false}, {"label": "C", "text": "Sinusoidal endothelial cells", "correct": false}, {"label": "D", "text": "Kupffer cells", "correct": true}], "correct_answer": "D. Kupffer cells", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/gPMx8Dt23O5SVTiLCsch1747380398.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which indicator is best for identifying alcohol disease?", "options": [{"label": "A", "text": "SGPT", "correct": false}, {"label": "B", "text": "SGOT", "correct": false}, {"label": "C", "text": "GGT", "correct": true}, {"label": "D", "text": "Serum Bilirubin", "correct": false}], "correct_answer": "C. GGT", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:600px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Alcoholic liver disease LFT</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>AST/ SGOT</strong></p>\n<p><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Non-specific ; ↑ (<300-400)</li>\n<li>This is a liver <span class=\"customMeta\" data-dictid=\"0f160e4e42169277718771b715516a\">enzyme</span> that rises in conditions causing liver damage, including alcohol-induced liver injury, but it is also elevated in a variety of <strong>non-liver</strong> conditions, like <strong>muscle injury</strong> or <strong>cardiac events.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>ALT/ SGPT</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Specific for liver injury ; ↑ (<300-400)</li>\n<li>This is another liver <span class=\"customMeta\" data-dictid=\"0f160e4e42169277718771b715516a\">enzyme</span> that primarily indicates <strong>liver cell injury</strong>, but it is <strong>less specific</strong> for alcohol-related liver disease compared to GGT.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>AST/ALT ratio: ≥ 2: 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Specific for ALD</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>ALP (Alkaline phosphatase)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Elevated in <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> pathologies</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>GGT (γ-glutamyl transferase)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Non-specific marker of ALD</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>5’-Nucleotidase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Specific marker for <span class=\"customMeta\" data-dictid=\"cf978047b61692777183c0569f21f2\">bile</span> <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> pathologies</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>S.Bilirubin</strong></p>\n<p><strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Usually normal/mildly ↑</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>S.Albumin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>↓ in chronic liver disease (cirrhosis)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Carbohydrate-deficient <span class=\"customMeta\" data-dictid=\"d404d819f41692777200b686a0759e\">transferrin</span> (CDT)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Best <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> marker for <span class=\"customMeta\" data-dictid=\"0751b802aa169277718100e38a1276\">alcoholic</span> liver disease.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis for a 25-year-old male who presented with fever and has the following viral marker results: HBsAg: Positive and IgM anti-HBc antibody: Positive", "options": [{"label": "A", "text": "Acute hepatitis", "correct": true}, {"label": "B", "text": "Chronic hepatitis", "correct": false}, {"label": "C", "text": "Window period", "correct": false}, {"label": "D", "text": "Persistent infection", "correct": false}], "correct_answer": "A. Acute hepatitis", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> h\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>HBs Ag</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Anti <span class=\"customMeta\" data-dictid=\"81bb02697216927771887f2fffc386\">Hbs</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Anti <span class=\"customMeta\" data-dictid=\"fda2696aa71692777188bfc39ce487\">Hbc</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>HBe Ag </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">IgM</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Acute <span class=\"customMeta\" data-dictid=\"d3d938151416927771887e91804b5b\">Hep</span> B Highly infectious</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">IgG</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"d3d938151416927771887e91804b5b\">Hep</span> B</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">IgG</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Recovery</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">IgM</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Gap period</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Vaccinated</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">IgG</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">–</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Low level carrier/ Remote infection</p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient with a history of chronic liver disease presents with symptoms of nausea, vomiting, edema, and ascites. On examination, his liver function tests are severely deranged. Further investigation reveals a diagnosis of hepatocellular carcinoma. The pathogenesis of this condition is most likely related to:", "options": [{"label": "A", "text": "Benzol", "correct": false}, {"label": "B", "text": "Arsenic", "correct": false}, {"label": "C", "text": "Aflatoxin", "correct": true}, {"label": "D", "text": "Vinyl chloride", "correct": false}], "correct_answer": "C. Aflatoxin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - \n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An alcoholic patient presents with lower back pain and fever. During history-taking, he mentions experiencing similar episodes in the past with amylase levels being elevated. Which type of necrosis is likely to be present?", "options": [{"label": "A", "text": "Fibrinoid necrosis", "correct": false}, {"label": "B", "text": "Fat necrosis", "correct": true}, {"label": "C", "text": "Coagulative necrosis", "correct": false}, {"label": "D", "text": "Liquefactive necrosis", "correct": false}], "correct_answer": "B. Fat necrosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/s9YmqDgjxHoHO9w1w1m71747218089.png", "https://image.prepladder.com/content/Ii5UFRMUw9Z0VuaFSDYb1747218089.png", "https://image.prepladder.com/content/hmovgxBbqqvDBBMYZuMY1747218089.png", "https://image.prepladder.com/content/L0rHZuWcIhSVRWkFhmlz1747218089.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Type of Necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Organ involved</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Coagulative necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ischaemia in the Heart, Liver, Kidney and dry gangrene.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Liquefactive necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hypoxic death of cells in CNS, Wet gangrene, Abscess.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Caseous necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TB infection.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Fibrinoid necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immune reaction involving blood vessels.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Fat necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Acute pancreatitis, Breast.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A health care worker has been found to be seropositive for HBsAg, HBeAg, and anti-HBc IgM, indicating an acute HBV infection with high infectivity. A liver biopsy in such cases is likely to show all the following except:", "options": [{"label": "A", "text": "Ballooning change of hepatocytes", "correct": false}, {"label": "B", "text": "Ground glass hepatocytes", "correct": true}, {"label": "C", "text": "Focal or spotty necrosis", "correct": false}, {"label": "D", "text": "Confluent necrosis of hepatocytes", "correct": false}], "correct_answer": "B. Ground glass hepatocytes", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/vbAgzMapKSDMzQn8F8ac1713765368.png"], "explanation": "<p>Correct Option B - Ground glass h\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man is found to have hepatomegaly on physical examination. He also complains of having dark tan skin despite avoiding sun exposure . His liver microscopy is given on the slide below. What is this patient most likely suffering from?", "options": [{"label": "A", "text": "Wilson’s disease", "correct": false}, {"label": "B", "text": "Autoimmune hepatitis", "correct": false}, {"label": "C", "text": "α-1 antitrypsin deficiency", "correct": false}, {"label": "D", "text": "Hemochromatosis", "correct": true}], "correct_answer": "D. Hemochromatosis", "question_images": ["https://image.prepladder.com/content/p60wqqurd6xYDpigAtjP1691237816.png"], "explanation_images": [], "explanation": "<p>Correct Option D - Hemoch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the diagnosis of the patient with the following serological status : HbsAg positive and HbeAg positive ?", "options": [{"label": "A", "text": "Acute viral hepatitis", "correct": false}, {"label": "B", "text": "Chronic viral hepatitis", "correct": false}, {"label": "C", "text": "Acute viral hepatitis with infectivity", "correct": true}, {"label": "D", "text": "Remote infection", "correct": false}], "correct_answer": "C. Acute viral hepatitis with infectivity", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/SnjYw3T2hkkBxnYn4tea1713769146.png"], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> <span class=\"customMeta\" data-dictid=\"39867f177b16927771888cf43850d5\">hepatitis</span> with infectiv\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Chronic viral hepatitis is seen with all of the following viruses, except ?", "options": [{"label": "A", "text": "HBV", "correct": false}, {"label": "B", "text": "HCV", "correct": false}, {"label": "C", "text": "HDV", "correct": false}, {"label": "D", "text": "HEV", "correct": true}], "correct_answer": "D. HEV", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - HEV\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man is found to have hepatomegaly on physical examination. He also complains of a dark tan despite avoiding sun exposure . His liver microscopy is given on the slide below. This patient most likely suffers from which condition ?", "options": [{"label": "A", "text": "Wilson’s disease", "correct": false}, {"label": "B", "text": "Autoimmune hepatitis", "correct": false}, {"label": "C", "text": "Alpha-1 antitrypsin deficiency", "correct": false}, {"label": "D", "text": "Hemochromatosis", "correct": true}], "correct_answer": "D. Hemochromatosis", "question_images": ["https://image.prepladder.com/content/AK5JBliTdJdFkGOXYqJ21691505746.png"], "explanation_images": [], "explanation": "<p>Correct Option D - Hemoch\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of these are characteristic features of pancreatic carcinoma , except :", "options": [{"label": "A", "text": "Cigarette smoking is a risk factor", "correct": false}, {"label": "B", "text": "Carcinoma of body pancreas often present with jaundice", "correct": true}, {"label": "C", "text": "They elicit intense desmoplastic response", "correct": false}, {"label": "D", "text": "Perineural invasion is common", "correct": false}], "correct_answer": "B. Carcinoma of body pancreas often present with jaundice", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> of body <span class=\"customMeta\" data-dictid=\"2e2fe8c6c116927771946fb9a8adb0\">pancreas</span> often present with jau\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 29 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Apart from the abdominal cavity, which body part is included in e-FAST?", "options": [{"label": "A", "text": "Pelvic Cavity", "correct": false}, {"label": "B", "text": "Peripheral vessels", "correct": false}, {"label": "C", "text": "Thoracic cavity", "correct": true}, {"label": "D", "text": "Dural and subdural spaces", "correct": false}], "correct_answer": "C. Thoracic cavity", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "According to GCS, a verbal score of 1 indicates:", "options": [{"label": "A", "text": "No Verbal response", "correct": true}, {"label": "B", "text": "Inappropriate words", "correct": false}, {"label": "C", "text": "Incomprehensible sounds", "correct": false}, {"label": "D", "text": "Oriented response", "correct": false}], "correct_answer": "A. No Verbal response", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:590px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Simplified Glasgow <span class=\"customMeta\" data-dictid=\"e39842f67b1692777184171cd1852a\">Coma</span> Scale (GCS) </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Category</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Response</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Score</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"4\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Eye Opening (E)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Spontaneous</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>4</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>To speech</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>3</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>To pain</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>2</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Verbal Response (V)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Oriented</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>5 <strong>(Option D ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Confused conversation</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>4</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Inappropriate words</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>3 <strong>(Option B ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Incomprehensible sounds</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>2 <strong>(Option C ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"6\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Motor Response (M)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Obeys commands</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>6</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Localizes to pain</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>5</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Withdraws from pain</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>4</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Abnormal <span class=\"customMeta\" data-dictid=\"85ff8a7ff81692777202a827961a5c\">flexion</span> (decorticate)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>3</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Abnormal extension (decerebrate)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>2</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>No response</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>1</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Most common site of peripheral aneurysm?", "options": [{"label": "A", "text": "Brachial artery", "correct": false}, {"label": "B", "text": "Popliteal artery", "correct": true}, {"label": "C", "text": "Radial artery", "correct": false}, {"label": "D", "text": "Femoral artery", "correct": false}], "correct_answer": "B. Popliteal artery", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which one of the following is absent in cases of massive blood transfusion?", "options": [{"label": "A", "text": "DIC", "correct": false}, {"label": "B", "text": "Febrile transfusion reaction", "correct": false}, {"label": "C", "text": "Hypercalcemia", "correct": true}, {"label": "D", "text": "Thrombocytopenia", "correct": false}], "correct_answer": "C. Hypercalcemia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:682px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Complications of massive blood transfusion</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Complication</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cause</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Effect</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hypothermia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Transfusion of cold blood (stored at 4°C).</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Body temperature drops, leading to impaired <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> mechanisms (coagulopathy), and worsening bleeding.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Coagulopathy</strong></p>\n<p> </p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Dilution of <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> factors and platelets due to transfusion; consumption of <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> factors by ongoing haemorrhage.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Impaired blood clotting, prolonged <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> time, thrombocytopenia, and increased risk of continued bleeding.</p>\n<p><strong>(Option D ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>DIC</strong></p>\n<p><strong>(Option A ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Due to the release of <span class=\"customMeta\" data-dictid=\"ff2094828c1692777196941a65e6eb\">procoagulant</span> substances</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Leads to haemorrhage due to depleted <span class=\"customMeta\" data-dictid=\"7414bd02f216927771889b3e159ef4\">hemostatic</span> components, tissue hypoxia, and <span class=\"customMeta\" data-dictid=\"77aed446d2169277719007f42bf052\">infarction</span> due to microthrombi, or both.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Citrate Toxicity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Large volumes of transfused blood contain citrate, which binds to calcium.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hypocalcemia leads to muscle cramps, seizures, and <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> arrhythmias.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hypocalcemia</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Packed red blood cells (PRBCs) and other blood products are preserved with <strong>citrate</strong>, an anticoagulant.</li>\n<li>Citrate binds to <strong>ionised calcium</strong> (Ca²⁺) in the recipient's blood, reducing the free <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> level - <strong>hypocalcemia</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Presents as muscle spasms, <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> arrhythmias, and decreased myocardial contractility</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hyperkalemia</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Potassium leaks from stored red blood cells into <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> during storage.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Elevated <span class=\"customMeta\" data-dictid=\"a995a613a016927771969d4395dc80\">potassium</span> levels (hyperkalemia) can cause <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> arrhythmias, potentially leading to <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> arrest.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hypokalemia</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Potassium may shift intracellularly once transfused red blood cells are metabolically revived.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hypokalemia causes muscle weakness, paralysis, and <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> arrhythmias.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Metabolic Alkalosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Rapid <span class=\"customMeta\" data-dictid=\"5b1a045f5f169277719210c0ac7a1e\">metabolism</span> of <span class=\"customMeta\" data-dictid=\"3569209ba41692777184f88db9316d\">citrate</span> into bicarbonate.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased pH (alkalosis) can lead to muscle twitching, irritability, and impaired oxygen release from haemoglobin.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Metabolic Acidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Inadequate tissue <span class=\"customMeta\" data-dictid=\"33dfead74b1692777195931780bd9e\">perfusion</span> leads to <span class=\"customMeta\" data-dictid=\"b82539c9ae1692777191a3f7ddd7bb\">lactic</span> acid accumulation.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Lowered blood pH (acidosis) leads to confusion, fatigue, rapid breathing, and worsened <span class=\"customMeta\" data-dictid=\"e2b5f013011692777183ea1b11ed9c\">cardiovascular</span> function.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Transfusion Related <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> Lung Injury (TRALI)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Antibodies in transfused blood <span class=\"customMeta\" data-dictid=\"dddc752e1716927771807f985bb8bb\">activate</span> the recipient's immune response, causing <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and fluid buildup in the lungs.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Non-cardiogenic <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">pulmonary</span> oedema, presenting as <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> <span class=\"customMeta\" data-dictid=\"afafb9026e1692777186e3dd168fa8\">distress</span> with <span class=\"customMeta\" data-dictid=\"a249eeb5551692777189661d39c1b2\">hypoxia</span> within 6 hours of transfusion.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Transfusion Associated Circulatory <span class=\"customMeta\" data-dictid=\"9d02a99d051692777194aa3375023b\">Overload</span> (TACO)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Volume of transfused blood exceeds the patient’s capacity to manage, leading to fluid overload.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Pulmonary oedema, shortness of breath, hypertension, and signs of heart failure.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Iron Overload</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Repeated transfusions lead to excessive accumulation of iron.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Iron deposits in organs (e.g., liver, heart, pancreas), lead to organ damage and failure over time.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Hemolytic Reactions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>ABO or Rh incompatibility.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Rapid destruction of red blood cells (hemolysis), causes fever, chills, hemoglobinuria, and potentially <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> failure or shock.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Allergic Reactions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Reaction to proteins in transfused blood products.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Symptoms range from mild itching, rash, or <span class=\"customMeta\" data-dictid=\"14ccc7cf1c1692777189d4fb9d1fb5\">hives</span> to severe <span class=\"customMeta\" data-dictid=\"d6d717efa216927771819fee139235\">anaphylaxis</span> (airway constriction, low blood pressure, shock).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bacterial Contamination</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Blood products are contaminated during collection or storage.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Sepsis, characterized by fever, chills, low blood pressure, and possibly <span class=\"customMeta\" data-dictid=\"39f67d7dde16927771985d3952058d\">septic</span> shock.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Febrile <span class=\"customMeta\" data-dictid=\"cbb73554631692777200444a9ea263\">transfusion</span> reaction</strong></p>\n<p><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>It is a non-hemolytic condition that is not completely understood but is believed to be caused by <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">residual</span> white blood cells in the blood unit or cytokines that accumulate during storage.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Fever, rigour, chills</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements about ranula is FALSE?", "options": [{"label": "A", "text": "Mucus extravasation cyst", "correct": false}, {"label": "B", "text": "Arises from submandibular salivary gland", "correct": true}, {"label": "C", "text": "Bluish, translucent cystic swelling on the floor of the mouth", "correct": false}, {"label": "D", "text": "Marsupialization or excision is the treatment", "correct": false}], "correct_answer": "B. Arises from submandibular salivary gland", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/akYmkU4Zg2U6E2ZO9wmY1747024988.png", "https://image.prepladder.com/content/GNogQfMmb7mub03r2GvM1747024988.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:622px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black\">\n<p><strong>Ranula</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Definition</strong></p>\n<p><strong>(Options A & C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<ul>\n<li>Ranulas are a type of <strong>extravasation mucocele</strong>, caused by the <span class=\"customMeta\" data-dictid=\"e73553a3a5169277719787fd5f4680\">rupture</span> of the main <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> or obstructed <span class=\"customMeta\" data-dictid=\"4e0948603216927771801829c2c085\">acini</span> of the <strong>sublingual gland</strong>.</li>\n<li>They appear as <strong>bluish, translucent, <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> <span class=\"customMeta\" data-dictid=\"e3d212ebd316927771996e0c472d4a\">swelling</span> on the floor of the mouth</strong> and resemble the belly of a frog.</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Ph0t0happy\" data-hash=\"\" data-license=\"CC-BY-SA-3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Ranula_human_09.jpg\" data-tags=\"\" height=\"513\" src=\"https://image.prepladder.com/content/akYmkU4Zg2U6E2ZO9wmY1747024988.png\" width=\"573\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<ul>\n<li>Commonly found in the <span class=\"customMeta\" data-dictid=\"1ba6a9cfe11692777181950edd7a6d\">anterior</span> floor of the mouth.</li>\n<li>When it extends through the <span class=\"customMeta\" data-dictid=\"d0922475bc1692777193d420470423\">mylohyoid</span> muscle, it presents as a <span class=\"customMeta\" data-dictid=\"a94c9109b016927771997aa2985457\">submental</span> <span class=\"customMeta\" data-dictid=\"e3d212ebd316927771996e0c472d4a\">swelling</span> known as a<strong> \"plunging ranula.\"</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Symptoms</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<p>Typically soft, fluctuant, and painless unless infected.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<ul>\n<li>Confirmed through Magnetic Resonance Imaging (MRI)</li>\n<li>Ultrasound</li>\n<li>Aspiration of thick, sticky <span class=\"customMeta\" data-dictid=\"6b0184a84d16927771981289924c2a\">saliva</span> differentiates it from a lymphangioma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none\">\n<p><strong>Treatment</strong></p>\n<p><strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none\">\n<ul>\n<li><strong>Excision of the <span class=\"customMeta\" data-dictid=\"75089cc39e1692777199b8933bd249\">sublingual</span> <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> is preferred. </strong></li>\n<li>Incision, drainage, and marsupialisation have low success rates. Although <strong>marsupialisation</strong> is often adequate, it has a higher <span class=\"customMeta\" data-dictid=\"1d849ebc9b1692777197d4af1fa8d2\">recurrence</span> rate compared to <span class=\"customMeta\" data-dictid=\"75089cc39e1692777199b8933bd249\">sublingual</span> <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> excision.</li>\n<li>OK-432 injection</li>\n<li>Botulinum <span class=\"customMeta\" data-dictid=\"41329dc9381692777200a9b6d57cf4\">toxin</span> injections</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"534\" src=\"https://image.prepladder.com/content/GNogQfMmb7mub03r2GvM1747024988.png\" width=\"534\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the probable diagnosis for a patient who is taking steroids for psoriasis and is experiencing a low-grade fever only at night, weight loss, and an ulcer on her neck with undermined edges, as depicted in the provided image?", "options": [{"label": "A", "text": "Psoriasis flare-up", "correct": false}, {"label": "B", "text": "Tubercular lymphadenitis", "correct": true}, {"label": "C", "text": "Lymphosarcoma", "correct": false}, {"label": "D", "text": "Syphilis", "correct": false}], "correct_answer": "B. Tubercular lymphadenitis", "question_images": ["https://image.prepladder.com/notes/1TH1dju86skmeaqbBBxB1747998760.png"], "explanation_images": ["https://image.prepladder.com/content/fEc4u0perN8HZQL6yWkS1747025426.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:688px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Lymph <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">Node</span> TB (Tuberculous Lymphadenitis)</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Most common</strong> <span class=\"customMeta\" data-dictid=\"728e7607f31692777187291e007a0b\">extrapulmonary</span> TB presentation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Risk Groups</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>HIV-positive individuals, Immunosuppressive individuals, children, and non-Caucasian women.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Causative Organism</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Previously M. bovis; now mainly M. tuberculosis.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical Presentation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Painless </strong>swelling in <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> nodes, usually <span class=\"customMeta\" data-dictid=\"a5c6cb079d16927771967e62ffee72\">posterior</span> <span class=\"customMeta\" data-dictid=\"25c6ce766c1692777184ab9a40305c\">cervical</span> or <span class=\"customMeta\" data-dictid=\"53765334f31692777199cf434360de\">supraclavicular</span> (historically called scrofula).</li>\n<li><strong>Early disease: Discrete nodes</strong></li>\n<li>Advanced disease: Matted, nontender mass, possible <span class=\"customMeta\" data-dictid=\"10df63cea41692777203b470341d21\">fistula</span> draining <span class=\"customMeta\" data-dictid=\"99368d5fef1692777183ea405bed67\">caseous</span> material.</li>\n<li>Pulmonary disease in <50% of cases.</li>\n<li>Systemic symptoms are uncommon except in HIV-positive patients.</li>\n<li>Non-specific reaction → Matting → Cold <span class=\"customMeta\" data-dictid=\"5618681fbe16927771804370383aaa\">Abscess</span> → Collar stud <span class=\"customMeta\" data-dictid=\"5618681fbe16927771804370383aaa\">abscess</span> → Sinus formation</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Fine-needle <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">aspiration</span> <span class=\"customMeta\" data-dictid=\"754ab07a2e1692777183ed178c883d\">biopsy</span> (80% yield) or <span class=\"customMeta\" data-dictid=\"81d12f9cb01692777199e44ff3f3c1\">surgical</span> <span class=\"customMeta\" data-dictid=\"20b3ce06c5169277718756ee95c1e9\">excision</span> biopsy.</strong></li>\n<li>Granulomatous lesions may or may not contain AFBs.</li>\n<li>Cultures are positive in 70–80% of cases.</li>\n<li>HIV-positive patients: Poorly organised or absent granulomas; higher bacterial loads increase <span class=\"customMeta\" data-dictid=\"552e9ef8811692777186997018b858\">diagnostic</span> yield.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Differential Diagnosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Infectious diseases</li>\n<li>Lymphomas</li>\n<li>Metastatic carcinomas</li>\n<li>Rare disorders: Kikuchi’s disease, Kimura’s disease, Castleman’s disease.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman comes to the OPD with a history of a lump in the left breast. On clinical examination, the size of the lump in the left breast is 9x10 cm with the following appearance and no axillary lymphadenopathy. The histopathology of the biopsy from the lump shows increased stromal cellularity and typical leaflike architecture. What is your likely diagnosis?", "options": [{"label": "A", "text": "Phyllodes tumour", "correct": true}, {"label": "B", "text": "Giant fibroadenoma", "correct": false}, {"label": "C", "text": "Inflammatory carcinoma", "correct": false}, {"label": "D", "text": "Ductal carcinoma", "correct": false}], "correct_answer": "A. Phyllodes tumour", "question_images": ["https://image.prepladder.com/content/d79JUMsTq9YVRORpAoQE1747116110.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the diagnosis from the given abdominal x-ray?", "options": [{"label": "A", "text": "Ureterocoele", "correct": false}, {"label": "B", "text": "Pelvic bone fracture", "correct": false}, {"label": "C", "text": "Rectal foreign body", "correct": true}, {"label": "D", "text": "Bladder stone", "correct": false}], "correct_answer": "C. Rectal foreign body", "question_images": ["https://image.prepladder.com/content/MyC6v9qsXI7vAK7gc0TR1748163282.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 18 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which connective tissue disorder is not associated with aneurysm formation?", "options": [{"label": "A", "text": "Marfan syndrome", "correct": false}, {"label": "B", "text": "Scurvy", "correct": false}, {"label": "C", "text": "Atherosclerosis", "correct": true}, {"label": "D", "text": "Ehler-Danlos syndrome", "correct": false}], "correct_answer": "C. Atherosclerosis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the likely diagnosis based on the provided X-ray image, along with normal clinical examination, hematological, and urinary test results, in a 65-year-old male patient?", "options": [{"label": "A", "text": "Multiple myeloma", "correct": false}, {"label": "B", "text": "Langerhans cell histiocytosis", "correct": true}, {"label": "C", "text": "Metastasis", "correct": false}, {"label": "D", "text": "Hyperparathyroidism", "correct": false}], "correct_answer": "B. Langerhans cell histiocytosis", "question_images": ["https://image.prepladder.com/content/P1QrhExVa0QhqbS3G1lS1693991276.png"], "explanation_images": [], "explanation": "<p>Correct option B. Langerhans cell histiocytosis.\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: center;\"><strong>Radiological Manifestations</strong></p>\n</td>\n<td>\n<p style=\"text-align: center;\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Punched-out <span class=\"customMeta\" data-dictid=\"d54da38aaa1692777191560f60c0f9\">lytic</span> lesions</p>\n</td>\n<td>\n<p>Well-defined, round or <span class=\"customMeta\" data-dictid=\"74793d564816927771943ae4ba74b3\">oval</span> areas of bone destruction</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Geographic bone lesions</p>\n</td>\n<td>\n<p>Expansile areas of bone destruction with well-defined borders</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Erlenmeyer <span class=\"customMeta\" data-dictid=\"017d1c6af716927772025c04337815\">flask</span> deformity</p>\n</td>\n<td>\n<p>Flaring and widening of the <span class=\"customMeta\" data-dictid=\"8ccb80bd4d169277719296d80e2193\">metaphysis</span> in long bones</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Bone cysts</p>\n</td>\n<td>\n<p>Cystic areas within the bone with thinning of the <span class=\"customMeta\" data-dictid=\"721937292f1692777185048f04ce29\">cortical</span> bone</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Vertebra plana</p>\n</td>\n<td>\n<p>Most common cause of <span class=\"customMeta\" data-dictid=\"89cd4b5bf716927772010247b57941\">vertebra</span> <span class=\"customMeta\" data-dictid=\"2d0756b0d11692777195ef3bcd110d\">plana</span> in children</p>\n<p>Mostly seen in <span class=\"customMeta\" data-dictid=\"3c6021096816927772007954fcc158\">thoracic</span> spine</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 36 year old male with skin – colored umbilicated papules. Microscopy is as shown below. The most likely diagnosis is?", "options": [{"label": "A", "text": "Herpes virus", "correct": false}, {"label": "B", "text": "Verruca vulgaris", "correct": false}, {"label": "C", "text": "Molluscum contagiosum", "correct": true}, {"label": "D", "text": "Lichen planus", "correct": false}], "correct_answer": "C. Molluscum contagiosum", "question_images": ["https://image.prepladder.com/content/ei0QUwjJnkiPXUDlm9Sl1695195101.png"], "explanation_images": [], "explanation": "<p>Correct Option C\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most abundant glycoprotein in basement membranes?", "options": [{"label": "A", "text": "Fibronectin", "correct": false}, {"label": "B", "text": "Laminin", "correct": true}, {"label": "C", "text": "Integrin", "correct": false}, {"label": "D", "text": "Syndecan", "correct": false}], "correct_answer": "B. Laminin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - L\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the subsequent choices is not classified as an intermediate filament?", "options": [{"label": "A", "text": "Vimentin", "correct": false}, {"label": "B", "text": "Tubulin", "correct": true}, {"label": "C", "text": "Desmin", "correct": false}, {"label": "D", "text": "Neurofilament", "correct": false}], "correct_answer": "B. Tubulin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Tubu\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td><strong>Intermediate Filament</strong></td>\n<td> </td>\n</tr>\n<tr>\n<td>Vimentin</td>\n<td>Mesenchymal cells</td>\n</tr>\n<tr>\n<td>Keratin</td>\n<td>Epithelial cells</td>\n</tr>\n<tr>\n<td>Desmin</td>\n<td>Muscle cells</td>\n</tr>\n<tr>\n<td>Neurofilament</td>\n<td>Neurons</td>\n</tr>\n<tr>\n<td>Glial fibrillary <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> protein</td>\n<td>Astrocytes</td>\n</tr>\n<tr>\n<td>Peripherin</td>\n<td>Peripheral neurons</td>\n</tr>\n<tr>\n<td>Nestin</td>\n<td>Neural stem cells</td>\n</tr>\n<tr>\n<td>Synemin</td>\n<td>Muscle cells</td>\n</tr>\n<tr>\n<td>Lamins</td>\n<td>Nucleus (nuclear lamina)</td>\n</tr>\n<tr>\n<td>Synaptophysin</td>\n<td>Neuronal <span class=\"customMeta\" data-dictid=\"e91c7a22e71692777196ef9e02b8c0\">presynaptic</span> terminals</td>\n</tr>\n<tr>\n<td>Internexin</td>\n<td>Developing neurons</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 15 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 45-year-old female presents with a palpable lump in her left breast which is freely mobile and painless. A biopsy of the lump was performed, and a histopathological examination was done. Which feature from the biopsy report is most likely to differentiate between benign and malignant breast lesions?", "options": [{"label": "A", "text": "Presence of well-defined glandular structures", "correct": false}, {"label": "B", "text": "Evidence of invasion into surrounding tissues", "correct": true}, {"label": "C", "text": "Low mitotic rate", "correct": false}, {"label": "D", "text": "Presence of fibrous stroma", "correct": false}], "correct_answer": "B. Evidence of invasion into surrounding tissues", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Benign Lesions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Malignant Lesions</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Growth</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Localised</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Invasive<strong> (Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Microscopic Appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Resemble normal tissue and maintain differentiated features. <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Cellular atypia</strong>, mitotic figures, loss of tissue organisation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Macroscopic Appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Well-defined borders</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Irregular borders, necrosis, hemorrhage.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Histological Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cells are typically uniform in size and shape, with minimal nuclear <span class=\"customMeta\" data-dictid=\"79886dc4391692777182791548ca21\">atypia</span> and low mitotic rate. <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cells may display pleomorphism, increased nuclear-to-cytoplasmic ratio, high mitotic rate, and evidence of invasion or metastasis.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following tumour is of mesenchymal origin?", "options": [{"label": "A", "text": "Adenoma", "correct": false}, {"label": "B", "text": "Papilloma", "correct": false}, {"label": "C", "text": "Seminoma", "correct": false}, {"label": "D", "text": "Leiomyoma", "correct": true}], "correct_answer": "D. Leiomyoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\"> </td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Mesenchymal Tumours</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Epithelial Tumours</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<p><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<ul>\n<li>Connective tissues and derivatives</li>\n<li>Blood and <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> vessels</li>\n<li>Hematopoietic stem cells and <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> tissue</li>\n<li>Meninges</li>\n<li>Mesothelium</li>\n<li>Smooth muscles and Skeletal muscles</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<ul>\n<li>Stratified <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span> epithelium</li>\n<li>Melanocytes and <span class=\"customMeta\" data-dictid=\"923af580cf16927771829606bce2a7\">basal</span> cells of the skin</li>\n<li>Glandular <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> and <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> of ducts</li>\n<li>Respiratory, Hepatic, Renal, Transitional, Testicular, <span class=\"customMeta\" data-dictid=\"797686400a16927771956b27d401ff\">Placental</span> epithelium</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Examples</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Leiomyosarcoma</li>\n<li>Lipoma</li>\n<li>Osteosarcoma</li>\n<li>Rhabdomyosarcoma</li>\n<li>Fibrosarcoma</li>\n<li>Meningioma</li>\n<li>Synovial sarcoma</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Adenocarcinoma</li>\n<li>Squamous cell carcinoma</li>\n<li>Adenoma<strong> </strong></li>\n<li>Papilloma<strong> </strong></li>\n<li>Seminoma</li>\n<li>Hepatocellular carcinoma</li>\n<li>Transitional cell carcinoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Vimentin</li>\n<li>Desmin</li>\n<li>S100 Protein</li>\n<li>Fibronectin</li>\n<li>Myogenin</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cytokeratin</li>\n<li>Epithelial <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">Membrane</span> <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">Antigen</span> (EMA)</li>\n<li>E-Cadherin</li>\n<li>P63, P40</li>\n<li>Carcinoembryonic <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">Antigen</span> (CEA)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis of a patient with a painless, slowly enlarging mass in the right parotid gland region that is well-defined and heterogeneous, with both epithelial and mesenchymal components present in the biopsy?", "options": [{"label": "A", "text": "Pleomorphic adenoma", "correct": true}, {"label": "B", "text": "Mucoepidermoid carcinoma", "correct": false}, {"label": "C", "text": "Acinic cell carcinoma", "correct": false}, {"label": "D", "text": "Warthin tumour", "correct": false}], "correct_answer": "A. Pleomorphic adenoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/m51h54Oqv1O5Ym642Tit1736952266.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old female presents with pelvic pain and irregular menstrual cycles. She undergoes surgical resection of the mass, and histopathological examination reveals a tumour composed of mature tissues derived from multiple germ layers, including hair, teeth, and sebaceous material. Based on the histopathological findings described, which of the following tumours is the most likely diagnosis?", "options": [{"label": "A", "text": "Teratoma", "correct": true}, {"label": "B", "text": "Serous cystadenoma", "correct": false}, {"label": "C", "text": "Mucinous cystadenoma", "correct": false}, {"label": "D", "text": "Granulosa cell tumour", "correct": false}], "correct_answer": "A. Teratoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2RU9cJU8tcbcinhdzezD1736952009.png", "https://image.prepladder.com/notes/6TuLLFl1c3zq9etQjN2s1743432373.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man presents with chronic heartburn and difficulty swallowing. Upon examination, the physician suspects gastroesophageal reflux disease (GERD) and orders an upper GI endoscopic biopsy, which reveals the presence of columnar epithelium in the lower oesophagus, replacing the normal squamous epithelium. Which of the following terms describes the observed cellular change?", "options": [{"label": "A", "text": "Metaplasia", "correct": true}, {"label": "B", "text": "Dysplasia", "correct": false}, {"label": "C", "text": "Anaplasia", "correct": false}, {"label": "D", "text": "Desmoplasia", "correct": false}], "correct_answer": "A. Metaplasia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/wj0t8UYoO9CZnVsVi3yd1736952540.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:683px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Metaplasia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Dysplasia </strong></p>\n<p style=\"text-align:center\"><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Anaplasia </strong></p>\n<p style=\"text-align:center\"><strong>(Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Replacement of one cell type by another that adapts to new stress.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Disordered, precancerous epithelial cell growth.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Loss of differentiation, where cells become more <span class=\"customMeta\" data-dictid=\"6d6e7d903b169277719662541dd5e2\">primitive</span> and undifferentiated.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Cause</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Due to exposure to irritants (e.g., <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> acid, tobacco smoke).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Not considered an adaptive response; may be due to persistent <span class=\"customMeta\" data-dictid=\"cb4dfcbab11692777192d282b3be7a\">metaplasia</span> or <span class=\"customMeta\" data-dictid=\"e32252a2c41692777194fe542b3e35\">pathologic</span> hyperplasia.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Often associated with <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> tumors or cancer.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Progression</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>May progress to <span class=\"customMeta\" data-dictid=\"984733db481692777186757cce6e6b\">dysplasia</span> and then <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> transformation (e.g., <span class=\"customMeta\" data-dictid=\"0ca34c5a9016927771822b04753ac3\">Barrett esophagus</span> to <span class=\"customMeta\" data-dictid=\"192677035a169277718780b4d6dbbb\">esophageal</span> adenocarcinoma).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>May progress to <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> <span class=\"customMeta\" data-dictid=\"96aaaa68ce1692777190096abe3c8a\">in situ</span> and eventually to <span class=\"customMeta\" data-dictid=\"1c5272ad3d1692777190e71409d07a\">invasive</span> carcinoma.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Directly related to malignancy; <span class=\"customMeta\" data-dictid=\"a902c8504e1692777181225c0a5de1\">anaplasia</span> is a hallmark of cancer cells.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Tissue Type Affected</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Can occur in both epithelial and <span class=\"customMeta\" data-dictid=\"67e237a57c16927771859803f93ab3\">connective</span> tissue (e.g., <span class=\"customMeta\" data-dictid=\"417c81834e169277719328d50305b6\">myositis</span> ossificans).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Primarily affects epithelial tissue.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Occurs in <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> tumors, both epithelial and mesenchymal.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Reversibility</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Reversible with removal of the inciting cause.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mild and moderate dysplasias may regress if the cause is alleviated. Severe <span class=\"customMeta\" data-dictid=\"984733db481692777186757cce6e6b\">dysplasia</span> often becomes irreversible.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Irreversible; reflects a <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> state.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Cellular Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Cells adapt by replacing one cell type with another (e.g., <span class=\"customMeta\" data-dictid=\"633c742e4116927771845f77370d44\">ciliated</span> <span class=\"customMeta\" data-dictid=\"8ff554096316927771851cc310435e\">columnar epithelium</span> replaced by <span class=\"customMeta\" data-dictid=\"e2f163c4cd1692777199def45e74f1\">stratified</span> <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span> epithelium).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Loss of uniformity in cell size and shape (pleomorphism), loss of tissue orientation, nuclear changes (e.g., increased nuclear:cytoplasmic ratio, clumped chromatin).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Complete loss of differentiation; cells are often pleomorphic, with <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> nuclei, and lack specialized functions.</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following features is not a characteristic of anaplasia?", "options": [{"label": "A", "text": "Pleomorphism", "correct": false}, {"label": "B", "text": "Loss of polarity", "correct": false}, {"label": "C", "text": "Increased nuclear-to-cytoplasmic ratio", "correct": false}, {"label": "D", "text": "Intact basement membrane", "correct": true}], "correct_answer": "D. Intact basement membrane", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/SHHtD0lzN7fkUm8Eua7o1736952938.png", "https://image.prepladder.com/content/r6qcQVWmaTwcNngUGtoJ1736953094.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is/are True? The basement membrane remains intact in dysplasia. Dysplasia is always irreversible. Pleomorphism is observed in metaplasia. Myositis ossificans is an example of dysplasia.", "options": [{"label": "A", "text": "1, 3 and 4", "correct": false}, {"label": "B", "text": "1 only", "correct": true}, {"label": "C", "text": "2 and 4", "correct": false}, {"label": "D", "text": "1, 2 and 3", "correct": false}], "correct_answer": "B. 1 only", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Metaplasia </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dysplasia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anaplasia </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Definition</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Differentiated cell</p>\n<p>type (epithelial or mesenchymal) is replaced by another cell type</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Disordered growth and loss of architectural orientation of cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lack of <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> and organisation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nature <strong>(Statement 2)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adaptive response to stress or injury</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Preneoplastic</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Associated with <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> transformation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reversibility</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reversible</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Reversible in early stages</p>\n<p>(irreversible if whole</p>\n<p>the <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> is involved)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Irreversible</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pleomorphism <strong>(Statement 3)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Absent</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present in low-grade</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present in high-grade</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nuclear-to-cytoplasmic ratio</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal (1:4 to 1:6)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased (↑)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased (↑↑↑)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mitotic figures</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Absent/minimal at normal places</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Typical <span class=\"customMeta\" data-dictid=\"e0da80f7b91692777192668c299922\">mitotic figures</span> present at <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> places</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Atypical, bizarre mitotic figures</p>\n<p>present at <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> places</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Basement <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> integrity</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Intact</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Intact</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breached</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Example<strong> (Statement 4)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Barret’s oesophagus,</p>\n<p>myositis ossificans</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cervical <span class=\"customMeta\" data-dictid=\"984733db481692777186757cce6e6b\">dysplasia</span> of</p>\n<p>squamous cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Carcinoma of the cervix, <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> oesophagus</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following characteristics distinguishes hemangiomas from other benign tumors?", "options": [{"label": "A", "text": "Rapid growth rate", "correct": false}, {"label": "B", "text": "Presence of extracellular matrix (ECM) deposited by stromal cells", "correct": false}, {"label": "C", "text": "Easily resected by excision", "correct": false}, {"label": "D", "text": "Unencapsulated", "correct": true}], "correct_answer": "D. Unencapsulated", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following types of cancer is least likely to exhibit distant metastasis?", "options": [{"label": "A", "text": "Renal cell carcinoma", "correct": false}, {"label": "B", "text": "Melanoma", "correct": false}, {"label": "C", "text": "Basal cell carcinoma", "correct": true}, {"label": "D", "text": "Prostatic carcinoma", "correct": false}], "correct_answer": "C. Basal cell carcinoma", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following tumours do not typically exhibit direct seeding of body cavities?", "options": [{"label": "A", "text": "Pseudomyxoma peritonei", "correct": false}, {"label": "B", "text": "Gastric carcinoma", "correct": false}, {"label": "C", "text": "Hepatocellular carcinoma", "correct": true}, {"label": "D", "text": "Medulloblastoma", "correct": false}], "correct_answer": "C. Hepatocellular carcinoma", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Rc064QhtimA3WEnqK4lS1748890112.mp3", "video": ""}, {"text": "Which of the following tumours does not follow the lymphatic metastatic pathway?", "options": [{"label": "A", "text": "Rhabdomyosarcoma", "correct": false}, {"label": "B", "text": "Krukenberg tumor", "correct": false}, {"label": "C", "text": "Follicular thyroid carcinoma", "correct": true}, {"label": "D", "text": "Synovial sarcoma", "correct": false}], "correct_answer": "C. Follicular thyroid carcinoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hematogenous spread</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymphatic spread</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Transcoelomic spread</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Veins are more <span class=\"customMeta\" data-dictid=\"607476ab371692777196d0cb2f13bc\">prone</span> to invasion than arteries due to their thinner walls.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tumours use existing <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> vessels at their margins. Follows natural routes of <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> drainage.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>invades the <span class=\"customMeta\" data-dictid=\"5ce9b6c57f1692777198cdc854b76a\">serosal</span> wall of the coelomic cavity, releasing tumour fragments into coelomic fluid, which is implanted elsewhere in the body cavity.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #6aa84f; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in most of the sarcomas.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #93c47d; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in most carcinomas.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #93c47d; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in Krukenberg tumour in the <span class=\"customMeta\" data-dictid=\"7b1a7ff355169277719401475de6fb\">ovary</span> due to <span class=\"customMeta\" data-dictid=\"d3251bfb0b1692777192b069d7ba4a\">metastasis</span> from <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> to the ovary. <strong>(Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Exceptions:</strong></p>\n<ul>\n<li>Synovial <span class=\"customMeta\" data-dictid=\"82068425041692777198fe3064c370\">sarcoma</span> <strong>(Option D)</strong></li>\n<li>Rhabdomyosarcoma <strong>(Option A)</strong></li>\n</ul>\n<p><br/>\n\t\t\tThese tumours are spread by the <strong>lymphatic </strong>route.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Exceptions:</strong></p>\n<ul>\n<li>HCC</li>\n<li>RCC</li>\n<li>Follicular <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> <strong>(Option C)</strong></li>\n<li>Choriocarcinoma</li>\n</ul>\n<p><br/>\n\t\t\tThese tumours are spread by a <strong>hematogenous </strong>route.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding the Sentinel lymph node?", "options": [{"label": "A", "text": "The first lymph node to receive metastasis from a secondary tumour.", "correct": false}, {"label": "B", "text": "Also helpful in identifying metastasis in Melanoma.", "correct": true}, {"label": "C", "text": "Commonly involved in skip metastasis", "correct": false}, {"label": "D", "text": "The presence of cancer cells indicates a good prognosis", "correct": false}], "correct_answer": "B. Also helpful in identifying metastasis in Melanoma.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following is used in immunohistochemical (IHC) staining as a chromogen to diagnose tumours of unknown origin?", "options": [{"label": "A", "text": "Diaminobenzidine", "correct": true}, {"label": "B", "text": "Congo Red", "correct": false}, {"label": "C", "text": "Masson's Trichrome", "correct": false}, {"label": "D", "text": "Mucicarmine", "correct": false}], "correct_answer": "A. Diaminobenzidine", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is a marker for breast cancer?", "options": [{"label": "A", "text": "CA-19-9", "correct": false}, {"label": "B", "text": "CA-125", "correct": false}, {"label": "C", "text": "CA-15-3", "correct": true}, {"label": "D", "text": "β - HCG", "correct": false}], "correct_answer": "C. CA-15-3", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:631px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tumor marker</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alpha-fetoprotein (AFP)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hepatocellular carcinoma (HCC)</li>\n<li>Hepatoblastoma</li>\n<li>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour (endodermal <span class=\"customMeta\" data-dictid=\"b0046463171692777198e0beea83e7\">sinus</span> tumour)</li>\n<li>Nonseminomatous <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumour of testis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>↑ AFP: abdominal wall defects, neural tube defects</li>\n<li>↓ AFP: associated with trisomy 21, 18, and 13 </li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>β-HCG (Option D)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Nonseminomatous testicular germ cell tumours (choriocarcinoma, embryonal cell carcinoma, mixed germ cell tumour, seminoma)</li>\n<li>Ovarian cancer: choriocarcinoma (gestational trophoblastic disease)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Carcinoembryonic antigen (CEA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Colorectal cancer</li>\n<li>Pancreatic cancer</li>\n<li>Breast cancer</li>\n<li>Lung cancer (especially in non-small cell cancers)</li>\n<li>Gastric cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prostate-specific antigen (PSA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Prostate cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Benign prostatic hyperplasia</li>\n<li>Prostatitis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Calcitonin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> cancer (both <span class=\"customMeta\" data-dictid=\"a325d0c14e16927771992fe8a96758\">sporadic</span> and associated with MEN 1 and MEN 2)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alkaline phosphatase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Metastases to bone or liver</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Paget disease of the bone</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Placental <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> phosphatase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Seminoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lactate dehydrogenase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ovarian cancer (dysgerminoma)</li>\n<li>Testicular <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumours (both seminoma and nonseminoma)</li>\n<li>Lymphomas</li>\n<li>Ewing's sarcoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Neuron specific enolase (NSE)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Neuroendocrine tumors</li>\n<li>Small cell lung cancer</li>\n<li>Carcinoid tumour</li>\n<li>Neuroblastoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CA 19–9 (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pancreatic adenocarcinoma</li>\n<li>Colon cancer</li>\n<li>Cholangiocarcinoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CA 15–3 and CA 27–29</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Breast cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CA 125 (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ovarian carcinoma</li>\n<li>Other <span class=\"customMeta\" data-dictid=\"29c037b45616927771886c286ed45b\">gynecologic</span> malignancies</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>S-100 protein (S100A) and (S100B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Malignant melanoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SMRP</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mesothelioma</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is used to determine treatment response in patients with colorectal cancer?", "options": [{"label": "A", "text": "Alpha-fetoprotein", "correct": false}, {"label": "B", "text": "Carcinoembryonic antigen", "correct": true}, {"label": "C", "text": "Human Chorionic Gonadotropin", "correct": false}, {"label": "D", "text": "Calcitonin", "correct": false}], "correct_answer": "B. Carcinoembryonic antigen", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What needle size is typically employed for Fine Needle Aspiration Cytology (FNAC) procedures?", "options": [{"label": "A", "text": "18-gauge needle", "correct": false}, {"label": "B", "text": "22-gauge needle", "correct": false}, {"label": "C", "text": "25-gauge needle", "correct": true}, {"label": "D", "text": "30-gauge needle", "correct": false}], "correct_answer": "C. 25-gauge needle", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/SsRqlbA6m4r5XH0nRrFo1737028542.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/cVJLiUO3xk6wTgU9Af701747311484.mp3", "video": ""}, {"text": "Which of the following conditions is FNAC helpful in establishing diagnosis ?", "options": [{"label": "A", "text": "Follicular adenoma of the thyroid", "correct": false}, {"label": "B", "text": "Testicular cancer", "correct": false}, {"label": "C", "text": "Hydatid cyst", "correct": false}, {"label": "D", "text": "Medullary thyroid carcinoma", "correct": true}], "correct_answer": "D. Medullary thyroid carcinoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Indications</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Contraindications /limitations</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thyroid disorders</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Follicular disorders of the <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> (Limitation) <strong>(Option A ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Breast lesions</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Infections, septicemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymph <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> evaluation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bleeding disorders</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pancreatic malignancy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hydatid cyst- Risk of <span class=\"customMeta\" data-dictid=\"d6d717efa216927771819fee139235\">anaphylaxis</span> <strong>(Option C ruled out)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Most solid organ masses accessible via FNAC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Testicular cancer- Increased risk of spread of cancer <strong>(Option B ruled out)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presents with a breast lump. On biopsy, the tissue shows anaplastic cells without any differentiation. Immunohistochemistry (IHC) staining is performed to characterise the tumour further. Which marker would be most appropriate to confirm the epithelial origin of the tumour cells in breast cancer?", "options": [{"label": "A", "text": "CD20", "correct": false}, {"label": "B", "text": "p63", "correct": false}, {"label": "C", "text": "TTF-1", "correct": false}, {"label": "D", "text": "CK7", "correct": true}], "correct_answer": "D. CK7", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the given neoplasias with their respective immunohistochemistry markers. 1. Carcinoma A. S100 2. Sarcoma B. Leucocyte common antigen 3. Lymphoma C. Cytokeratin 4. Melanoma D. Vimentin", "options": [{"label": "A", "text": "1-C, 2-A, 3-B, 4-D", "correct": false}, {"label": "B", "text": "1-A, 2-C, 3-B, 4-D", "correct": false}, {"label": "C", "text": "1-C, 2-D, 3-B, 4-A", "correct": true}, {"label": "D", "text": "1-A, 2-D, 3-B, 4-C", "correct": false}], "correct_answer": "C. 1-C, 2-D, 3-B, 4-A", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1. Carcinoma(epithelial origin/squamous cell carcinoma)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytokeratin</p>\n<p>Cytokeratin 1, <span class=\"customMeta\" data-dictid=\"bc3875332b1692777185e2c8163a73\">cytokeratin</span> 10</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2. Sarcoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Vimentin, desmin(skeletal muscle)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3. Lymphoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Leucocyte common antigen, CD 45</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4. Melanoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>S100, HMB45,Melan A</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old male was diagnosed with a lung malignancy two months ago. He now came with complaints of malaise, abdominal pain, bone pain, lethargy, and confusion. The intern suspects a condition related to lung cancer and decides to send a blood test. Which of the following would be the appropriate test?", "options": [{"label": "A", "text": "Erythropoietin", "correct": false}, {"label": "B", "text": "Adrenocorticotrophic hormone", "correct": false}, {"label": "C", "text": "Parathyroid hormone-related protein", "correct": true}, {"label": "D", "text": "Antidiuretic hormone", "correct": false}], "correct_answer": "C. Parathyroid hormone-related protein", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following paraneoplastic syndrome is not associated with lung cancer?", "options": [{"label": "A", "text": "Dermatomyositis", "correct": false}, {"label": "B", "text": "Acanthosis nigricans", "correct": false}, {"label": "C", "text": "Myasthenia", "correct": false}, {"label": "D", "text": "Red cell aplasia", "correct": true}], "correct_answer": "D. Red cell aplasia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cushing syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the lung, Pancreatic tumours</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SIADH</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the lung</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypercalcemia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Squamous cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the lung</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Myasthenia(Lambert-Eaton) (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bronchogenic carcinoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acanthosis <span class=\"customMeta\" data-dictid=\"50255f706b169277719388336f0dd4\">nigricans</span> (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adenocarcinoma lung</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dermatomyositis (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bronchogenic carcinoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypertrophic osteoarthropathy</strong></p>\n<p><strong>and <span class=\"customMeta\" data-dictid=\"4defbc994e16927771848875f94fee\">clubbing</span> of the fingers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adenocarcinoma lung</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Venous <span class=\"customMeta\" data-dictid=\"3e745919391692777200fae21b7251\">thrombosis</span> (Trousseau</strong></p>\n<p><strong>phenomenon</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pancreatic carcinoma, Bronchogenic carcinoma</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An appendix specimen, whose HPE is shown below, had a 2 cm submucosal nodule identified. Electron microscopy showed numerous neurosecretory granules in the cytoplasm. Twenty-four-hour urine analysis showed an elevation of 5-hydroxy indoleacetic acid (5-HIAA). Which of the following would not be seen in this condition?", "options": [{"label": "A", "text": "Flushing", "correct": false}, {"label": "B", "text": "Diarrhea", "correct": false}, {"label": "C", "text": "Valvular heart disease", "correct": false}, {"label": "D", "text": "Bronchodilation", "correct": true}], "correct_answer": "D. Bronchodilation", "question_images": ["https://image.prepladder.com/content/1wBXBMbN3QWMYVjkU9311737028641.png"], "explanation_images": ["https://image.prepladder.com/content/WZx95CKfewZnjAQGhaZw1737028684.png", "https://image.prepladder.com/content/ZnJ8CkJAkdK8wx3uxK9W1736958838.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 60-year-old man who has worked in the zinc mines presents to his urologist with urinary symptoms, including increased frequency, hesitancy, and nocturia. During a digital rectal examination, he is found to have an enlarged prostate with a palpable nodule. Which environmental exposure is most likely associated with his prostate cancer risk?", "options": [{"label": "A", "text": "Zinc", "correct": false}, {"label": "B", "text": "Benzopyrene", "correct": false}, {"label": "C", "text": "Arsenic", "correct": false}, {"label": "D", "text": "Cadmium", "correct": true}], "correct_answer": "D. Cadmium", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Carcinogen</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Associated Cancer</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Aflatoxins</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Hepatocellular <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (Liver)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Alkylating agents</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Leukemia, lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Aromatic amines</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Bladder cancer (Transitional cell carcinoma)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Arsenic</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Liver (Hepatic angiosarcoma), lung, skin (Squamous cell carcinoma)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Asbestos</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Lung (Bronchogenic carcinoma), mesothelioma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Tobacco smoke</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Bladder (Transitional cell carcinoma), cervix, esophagus, kidney, larynx, lung, oropharynx, pancreas</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Ionizing radiation</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Leukemia, <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> (Papillary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinoma)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Nickel, chromium, beryllium, silica</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Lung cancer</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Nitrosamines</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Stomach (Gastric cancer, intestinal type)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Radon</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Lung cancer</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Vinyl chloride</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Liver (Hepatic angiosarcoma)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>EBV (Epstein-Barr virus)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Burkitt lymphoma, Hodgkin lymphoma, <span class=\"customMeta\" data-dictid=\"790f98dd571692777193fd47da1230\">nasopharyngeal</span> carcinoma, primary <span class=\"customMeta\" data-dictid=\"e1a4a12fb416927771841c46faf6fb\">CNS</span> lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>HBV, <span class=\"customMeta\" data-dictid=\"ea263cfb7716927771886ad52146e0\">HCV</span> (Hepatitis B and C viruses)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Hepatocellular <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (Liver)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>HHV-8 (Human <span class=\"customMeta\" data-dictid=\"c68a8d1fc016927771880d99a69e9f\">herpesvirus</span> 8)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Kaposi's sarcoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>HPV (Human papillomavirus)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cervical, penile/anal carcinoma, head and neck cancer</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>H. pylori</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Gastric adenocarcinoma, <span class=\"customMeta\" data-dictid=\"62de0ec43c16927771912c01f6f373\">MALT</span> lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>HTLV-1 (Human T-lymphotropic virus)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Adult T-cell leukemia/lymphoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Liver <span class=\"customMeta\" data-dictid=\"61cf8cf31116927772021c5d12d815\">fluke</span> (Clonorchis sinensis)</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cholangiocarcinoma (Bile <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> cancer)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Schistosoma haematobium</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Squamous cell <span class=\"customMeta\" data-dictid=\"e6cfda323816927771839cc83e376d\">bladder</span> cancer</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/eRB3ATvj0fkC4B6cpMW91749031995.mp3", "video": ""}, {"text": "Which of the following conditions is most likely associated with vinyl chloride exposure?", "options": [{"label": "A", "text": "Hepatocellular carcinoma", "correct": false}, {"label": "B", "text": "Hepatic angiosarcoma", "correct": true}, {"label": "C", "text": "Cholangiocarcinoma", "correct": false}, {"label": "D", "text": "Focal nodular hyperplasia", "correct": false}], "correct_answer": "B. Hepatic angiosarcoma", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/6hcqrKfA4sxDysgjM6m41749032095.mp3", "video": ""}, {"text": "A 16-year-old girl presents with a clear-cell vaginal tumour. Upon further inquiry, it was revealed that her mother has a history of taking medication during pregnancy to prevent premature labour. Which medication is most likely associated with the development of this tumour in the daughter?", "options": [{"label": "A", "text": "DES (Diethylstilbestrol)", "correct": true}, {"label": "B", "text": "Thalidomide", "correct": false}, {"label": "C", "text": "Tamoxifen", "correct": false}, {"label": "D", "text": "Medroxyprogesterone acetate", "correct": false}], "correct_answer": "A. DES (Diethylstilbestrol)", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/BwPf0QBTPyTIlLpMzrio1749032192.mp3", "video": ""}, {"text": "Which of the following is not an indirect-acting carcinogen?", "options": [{"label": "A", "text": "Griseofulvin", "correct": false}, {"label": "B", "text": "Azo dyes", "correct": false}, {"label": "C", "text": "Nitrosoureas", "correct": true}, {"label": "D", "text": "Betel nuts", "correct": false}], "correct_answer": "C. Nitrosoureas", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Direct-Acting Carcinogens</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Indirect-Acting Carcinogens</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mode of action</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Directly damage DNA, leading to mutations</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Require <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> conversion to become active (ultimate carcinogens)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Carcinogenic potency</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Typically weak</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More potent</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Endogenous enzymes involved</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>None</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cytochrome P-450 enzymes play a key role</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Examples</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Alkylating agents (Anti-cancer drugs) like nitrosoureas, cyclophosphamide</li>\n<li>Acylating agents</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Aromatic hydrocarbons like benzo[a]pyrene</li>\n<li>Aromatic Amines, Amides, <span class=\"customMeta\" data-dictid=\"965f6e274e1692777182c812d7a17d\">Azo</span> Dyes <strong>(Option B)</strong></li>\n<li>Natural Plant and <span class=\"customMeta\" data-dictid=\"04f4b6dbf71692777192ca0c4f70fa\">Microbial</span> Products like <span class=\"customMeta\" data-dictid=\"4435e6aa0e1692777180e2f819ad80\">Aflatoxin</span> B1, Griseofulvin, and <span class=\"customMeta\" data-dictid=\"4b63b4a64c1692777182b509b257e2\">Betel</span> nuts <strong>(Options A, D)</strong></li>\n<li>Insecticides, fungicides</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/KTsy88KjznRRK6lTIUyv1749032466.mp3", "video": ""}, {"text": "Which of the following radiations is the most common cause of skin cancer?", "options": [{"label": "A", "text": "UV-A radiation", "correct": false}, {"label": "B", "text": "UV-B radiation", "correct": true}, {"label": "C", "text": "UV-C radiation", "correct": false}, {"label": "D", "text": "UV-D radiation", "correct": false}], "correct_answer": "B. UV-B radiation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/pdUKnlUkYGiJeg8gg9Bx1749032602.mp3", "video": ""}, {"text": "A 55-year-old female radiology technician with 25 years of occupational exposure to diagnostic X-rays and fluoroscopy presents with a three-month history of increasing fatigue, unintentional weight loss, and frequent infections. Which cancer type is most likely associated with her occupational history?", "options": [{"label": "A", "text": "Acute Myeloid Leukemia", "correct": true}, {"label": "B", "text": "Pancreatic cancer", "correct": false}, {"label": "C", "text": "Medullary thyroid cancer", "correct": false}, {"label": "D", "text": "Chronic Lymphocytic Leukemia", "correct": false}], "correct_answer": "A. Acute Myeloid Leukemia", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/6IAC76U8xSK8xALLRJAn1749032712.mp3", "video": ""}, {"text": "A 35-year-old woman presents for a routine gynaecological examination. Her Pap smear and biopsy reveals abnormal cells suggestive of cervical dysplasia. Further, HPV testing indicates the presence of specific HPV types associated with cervical cancer. Which HPV types are most commonly linked to an increased risk of cervical cancer in this patient?", "options": [{"label": "A", "text": "Low-risk 6, 11", "correct": false}, {"label": "B", "text": "High-risk 6, 11", "correct": false}, {"label": "C", "text": "Low-risk 16, 18", "correct": false}, {"label": "D", "text": "High-risk 16, 18", "correct": true}], "correct_answer": "D. High-risk 16, 18", "question_images": ["https://image.prepladder.com/content/uCun2rVoVZpkWgDzHDM11736953581.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/YvRHNqTOaLwaUtqLcKvv1749032841.mp3", "video": ""}, {"text": "A 35-year-old woman with regular menstrual cycles undergoes routine Pap smear screening, which reveals a high-grade squamous intraepithelial lesion (HSIL) of the cervix. Further testing confirms infection with high-risk HPV type 16. Which of the following mechanisms regarding the oncogenic activity of E6 and E7 of HPV is correct?", "options": [{"label": "A", "text": "E6 protein inhibits the degradation of p53.", "correct": false}, {"label": "B", "text": "E6 stimulates the expression of TERT.", "correct": true}, {"label": "C", "text": "E7 activates CDK inhibitors.", "correct": false}, {"label": "D", "text": "E7 can inactivate cyclins A and E", "correct": false}], "correct_answer": "B. E6 stimulates the expression of TERT.", "question_images": ["https://image.prepladder.com/content/7Zdd6kVbbZtEKO7gWCio1736958365.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Oncogenic Activities of E6 Protein</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Oncogenic Activities of E7 Protein</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<ul>\n<li>Binds to and promotes <span class=\"customMeta\" data-dictid=\"d395f610461692777185cbe8b8806d\">degradation</span> of <span class=\"customMeta\" data-dictid=\"14caf753cb169277719405bdd25002\">p53</span> → Impairs cell growth and <span class=\"customMeta\" data-dictid=\"4bfa3e6f2c1692777181c53b124cf7\">apoptosis</span> regulation <strong>(Option A).</strong></li>\n<li>Stimulates expression of TERT (telomerase reverse transcriptase) → Facilitates <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> immortalisation by maintaining <span class=\"customMeta\" data-dictid=\"b9d804af7716927772001ebdb234b1\">telomere</span> length.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #0d0d0d; vertical-align:top\">\n<ul>\n<li>Disrupts interaction between RB protein and E2F <span class=\"customMeta\" data-dictid=\"739aa4b5ea1692777200a636ee075f\">transcription</span> factors</li>\n<li>Inactivates <span class=\"customMeta\" data-dictid=\"21f7c13ced1692777183f46684de3a\">CDK</span> inhibitors (e.g., p21 and p27)<strong> (Option C).</strong></li>\n<li>Activates cyclins A and E<strong> (Option D)</strong></li>\n</ul>\n\t\t\t \n\n\t\t\t<p>All these mechanisms enhance <span class=\"customMeta\" data-dictid=\"5173f9c96716927771843cbe0c7611\">cell cycle</span> <span class=\"customMeta\" data-dictid=\"3c305b384216927771969ca4166493\">progression</span> and <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> <span class=\"customMeta\" data-dictid=\"8eedb6cec61692777196a6a3b93d3f\">proliferation</span> in <span class=\"customMeta\" data-dictid=\"6bca6e988d1692777189167b791930\">HPV</span> infections.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Dt0Y1obMVBTm41JiVYoQ1745332842.mp3", "video": ""}, {"text": "A 10-year-old girl presents with rapidly growing jaw swelling and pain. Further examination reveals bilateral enlargement of the mandible and maxilla. Biopsy suggests the presence of a starry-sky appearance as shown in the image. Which of the following infectious agents is most commonly associated with the pathogenesis of this malignancy?", "options": [{"label": "A", "text": "EBV", "correct": true}, {"label": "B", "text": "HTLV-1", "correct": false}, {"label": "C", "text": "HHV-8", "correct": false}, {"label": "D", "text": "Aspergillus flavus", "correct": false}], "correct_answer": "A. EBV", "question_images": ["https://image.prepladder.com/content/rzIoNogAh882rNQZxOE61736957712.png"], "explanation_images": ["https://image.prepladder.com/content/cRh07rx7322W7kjfhmpP1736957784.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/6oFixwforJNvt40HweLl1749034087.mp3", "video": ""}, {"text": "Which of the following statements regarding H. pylori infection and its association with malignancies is correct ?", "options": [{"label": "A", "text": "Gastric lymphomas associated with H. pylori infection are primarily of B-cell origin.", "correct": true}, {"label": "B", "text": "H. pylori strains associated with gastric adenocarcinomas contain the cytotoxin-associated B gene.", "correct": false}, {"label": "C", "text": "VacA, a toxin from H. pylori, causes gastric cell apoptosis, reducing cancer risk.", "correct": false}, {"label": "D", "text": "MALT lymphomas associated with t(11;18) translocation respond to anti-H.Pylori therapy.", "correct": false}], "correct_answer": "A. Gastric lymphomas associated with H. pylori infection are primarily of B-cell origin.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following carcinogens with the respective cancer risk 1. Azodyes a) Urothelial carcinoma of the bladder 2. Schistosoma haematobium b) AML &amp; ALL 3. Radon c) Squamous cell carcinoma of the bladder 4. Benzene d) Squamous cell carcinoma of the lung", "options": [{"label": "A", "text": "1-a, 2-c, 3- d, 4-b", "correct": true}, {"label": "B", "text": "1-a, 2-c, 3- b, 4-d", "correct": false}, {"label": "C", "text": "1-c, 2-a, 3- d, 4-b", "correct": false}, {"label": "D", "text": "1-c, 2-a, 3- b, 4-d", "correct": false}], "correct_answer": "A. 1-a, 2-c, 3- d, 4-b", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Risk factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Cancer risk</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Azodyes/ Beta <span class=\"customMeta\" data-dictid=\"d91ca7c5fe1692777193afb154ccf4\">naphthyl</span> amine/Benzidine</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Urothelial carcinoma/ Transitional cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the bladder</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Schistosoma haematobium</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Squamous cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the bladder</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Radon</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Squamous cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the lung</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Benzene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>AML & ALL</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 21 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which gene mutation, known for encoding a growth factor, is associated with the development of astrocytoma?", "options": [{"label": "A", "text": "PDGFB", "correct": true}, {"label": "B", "text": "HST1", "correct": false}, {"label": "C", "text": "FGF3", "correct": false}, {"label": "D", "text": "HGF", "correct": false}], "correct_answer": "A. PDGFB", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Growth factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proto-oncogene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tumour-associated </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Platelet-derived growth factor-β</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PDGFB<strong> (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Astrocytoma</p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibroblast growth factor</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HST<strong> (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Osteosarcoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>FGF3<strong> (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Urinary <span class=\"customMeta\" data-dictid=\"e6cfda323816927771839cc83e376d\">bladder</span> and Gastric cancers</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Transforming growth factor-α</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TGFA</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Astrocytoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hepatocyte growth factor</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HGF <strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hepatocellular carcinomas</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70-year-old male presented with a persistent cough, weight loss, and shortness of breath. A CT scan of the chest revealed a lesion consistent with adenocarcinoma of the lung. Which of the following growth factor receptor mutations can lead to adenocarcinoma of the lungs?", "options": [{"label": "A", "text": "FLT3 and RET", "correct": false}, {"label": "B", "text": "ALK and ERBB1", "correct": true}, {"label": "C", "text": "RET and KIT", "correct": false}, {"label": "D", "text": "KIT and FLT3", "correct": false}], "correct_answer": "B. ALK and ERBB1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Y3Qc96vUCuZkJE6Ce8W41736959133.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proto-oncogene for growth factor receptor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated tumour</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ERBB (EGFR)</p>\n<p>ERBB2 (HER2)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adenocarcinoma of lung</p>\n<p>Amplification Breast carcinoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>FLT3</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Leukaemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>RET</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Familial <span class=\"customMeta\" data-dictid=\"0a36e18386169277719259641cf29b\">medullary</span> <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinomas</p>\n<p>Multiple <span class=\"customMeta\" data-dictid=\"d8216cf7571692777187baa94b8612\">endocrine</span> <span class=\"customMeta\" data-dictid=\"e212826c171692777193374ca34435\">neoplasia</span> 2A and B,</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ALK</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adenocarcinoma of lung</p>\n<p>Neuroblastoma</p>\n<p>Certain lymphomas</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>KIT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gastrointestinal stromal tumors, Seminomas</p>\n<p>AML</p>\n<p>Mastocytosis</p>\n<p>Melanoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PDGFR-B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Brain tumours</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the correctly matched pair of RAS mutation and its associated malignancy.", "options": [{"label": "A", "text": "KRAS- Bladder cancer", "correct": false}, {"label": "B", "text": "HRAS- Lung cancer", "correct": false}, {"label": "C", "text": "KRAS- Kidney cancer", "correct": false}, {"label": "D", "text": "NRAS- Melanoma", "correct": true}], "correct_answer": "D. NRAS- Melanoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:482px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Signal <span class=\"customMeta\" data-dictid=\"bbe208d0b116927772002509d5c4c0\">Transduction</span> Protein</strong><br/>\n<strong>(GTP-binding proteins)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Malignancies</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>KRAS</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Colon, Lung, Pancreatic tumours</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HRAS</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bladder and <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">kidney</span> tumors</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>NRAS</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Melanomas, AML</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>GNAS</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pituitary adenoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>GNAQ</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Uveal melanoma</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following protooncogenes with their malignancies. Proto-oncogene Malignancy 1. JAK-2 a. Hairy cell leukemia 2. BRAF b. Neuroblastoma 3. N Myc c. Burkitt's lymphoma 4. C Myc d. Polycythemia vera", "options": [{"label": "A", "text": "1-b, 2-a, 3-d, 4-c", "correct": false}, {"label": "B", "text": "1-d, 2-a, 3-b, 4-c", "correct": true}, {"label": "C", "text": "1-c, 2-a, 3-b, 4-d", "correct": false}, {"label": "D", "text": "1-d, 2-b, 3-c, 4-a", "correct": false}], "correct_answer": "B. 1-d, 2-a, 3-b, 4-c", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:531px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proto-oncogene</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Malignancy</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>JAK-2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Polycythemia vera</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>BRAF</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hairy cell leukemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>N Myc</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neuroblastoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C Myc</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Burkitt's lymphoma</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/Rxwwa5NJ2iTaZ81LoYf91747303115.mp3", "video": ""}, {"text": "Which of the following cyclin-CDK combinations is incorrectly matched?", "options": [{"label": "A", "text": "Cyclin A- CDK 2", "correct": false}, {"label": "B", "text": "Cyclin B- CDK 6", "correct": true}, {"label": "C", "text": "Cyclin D- CDK 4", "correct": false}, {"label": "D", "text": "Cyclin E- CDK 2", "correct": false}], "correct_answer": "B. Cyclin B- CDK 6", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:625px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Cyclin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>CDK</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Function</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cyclin A</p>\n<p><strong>(Option 1)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>CDK1, CDK2</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Activates <span class=\"customMeta\" data-dictid=\"e700e82d9d169277718624870016ae\">DNA replication</span> in the S phase</li>\n<li>The transition from <span class=\"customMeta\" data-dictid=\"fe4f1996791692777198b3f5161f1d\">S phase</span> to the G2 phase</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cyclin B</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>CDK1</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Promotes assembly of <span class=\"customMeta\" data-dictid=\"d1ca319ebd1692777192a60ed7c087\">mitotic spindle</span> (G2-to-M)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cyclin D</p>\n<p><strong>(Option 3)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>CDK4, CDK6</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Promotes G1-to-S transition by phosphorylating Rb</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Cyclin E</p>\n<p><strong>(Option 4)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>CDK2</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<ul>\n<li>Promotes G1-to-S transition by phosphorylating Rb</li>\n<li>Initiates DNA synthesis</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 9-year-old child presents with multiple freckle-like dark spots on sun-exposed areas such as the face and arms. The child complains of discomfort and pain upon exposure to sunlight, and there is evidence of sunburn even after brief periods outdoors. Upon further questioning, they reveal a family history of skin cancer in relatives who also experienced similar skin issues from a young age. What is the most likely diagnosis and the genetic defect in this condition?", "options": [{"label": "A", "text": "Xeroderma pigmentosum, defective homologous repair", "correct": false}, {"label": "B", "text": "Cockyane syndrome, nucleotide excision repair", "correct": false}, {"label": "C", "text": "Xeroderma pigmentosum, nucleotide excision repair", "correct": true}, {"label": "D", "text": "Bloom syndrome, defective homologous repair", "correct": false}], "correct_answer": "C. Xeroderma pigmentosum, nucleotide excision repair", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:574px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Repair Mechanism Defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Associated Defect</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Nucleotide <span class=\"customMeta\" data-dictid=\"20b3ce06c5169277718756ee95c1e9\">Excision</span> Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Xeroderma Pigmentosum (XP)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Base <span class=\"customMeta\" data-dictid=\"20b3ce06c5169277718756ee95c1e9\">Excision</span> Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>MUTYH-Associated <span class=\"customMeta\" data-dictid=\"fe6b8df2fa1692777196938c42762a\">Polyposis</span> (MAP)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mismatch Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Lynch Syndrome (HNPCC)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Homologous <span class=\"customMeta\" data-dictid=\"3a379aaafc1692777197e1f873883d\">Recombination</span> Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>BRCA1/BRCA2 Mutations</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Proteasomal <span class=\"customMeta\" data-dictid=\"d395f610461692777185cbe8b8806d\">Degradation</span> Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Amyotrophic <span class=\"customMeta\" data-dictid=\"fc380e21321692777191739bd99191\">Lateral</span> <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">Sclerosis</span> (ALS)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Chaperone-Mediated Protein Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Cystic Fibrosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Cell Cycle <span class=\"customMeta\" data-dictid=\"cd249aae061692777184c11176df48\">Checkpoint</span> Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Ataxia-Telangiectasia (AT)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mitochondrial DNA Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mitochondrial Myopathy</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following diseases is associated with a defect in homologous DNA repair?", "options": [{"label": "A", "text": "Trichothiodystrophy", "correct": false}, {"label": "B", "text": "Fanconi anemia", "correct": true}, {"label": "C", "text": "Endometrial carcinoma", "correct": false}, {"label": "D", "text": "Wermer syndrome", "correct": false}], "correct_answer": "B. Fanconi anemia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements are true regarding Lynch syndrome?", "options": [{"label": "A", "text": "It is autosomal recessive in inheritance.", "correct": false}, {"label": "B", "text": "It is also known as hereditary breast and ovarian cancer syndrome.", "correct": false}, {"label": "C", "text": "It is caused by mutations in genes involved in nonhomologous end-joining repair.", "correct": false}, {"label": "D", "text": "Amsterdam II criteria are used for diagnosis.", "correct": true}], "correct_answer": "D. Amsterdam II criteria are used for diagnosis.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true regarding the Warburg effect?", "options": [{"label": "A", "text": "Cancer cells primarily rely on oxidative phosphorylation for ATP production.", "correct": false}, {"label": "B", "text": "It involves a shift from glycolysis to oxidative phosphorylation in cancer cells.", "correct": false}, {"label": "C", "text": "Cancer cells exhibit increased glucose uptake and preferentially metabolise glucose via glycolysis, even in the presence of oxygen.", "correct": true}, {"label": "D", "text": "It is characterised by decreased glucose uptake and utilisation by cancer cells.", "correct": false}], "correct_answer": "C. Cancer cells exhibit increased glucose uptake and preferentially metabolise glucose via glycolysis, even in the presence of oxygen.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following mechanisms is not employed by tumour cells to evade the host immune system?", "options": [{"label": "A", "text": "Selective outgrowth of the antigen-negative variants", "correct": false}, {"label": "B", "text": "Reduced expression of MHC molecules", "correct": false}, {"label": "C", "text": "Secretion of immunosuppressive factors", "correct": false}, {"label": "D", "text": "Enhanced antigen presentation to promote T cell activation", "correct": true}], "correct_answer": "D. Enhanced antigen presentation to promote T cell activation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Immune <span class=\"customMeta\" data-dictid=\"cd249aae061692777184c11176df48\">checkpoint</span> inhibitors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CTLA-4 inhibitors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PD-1 inhibitors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PD-L1 (PD-1 ligand) inhibitors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ipilimumab</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pembrolizumab</li>\n<li>Nivolumab</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Atezolizumab</li>\n<li>Avelumab</li>\n<li>Durvalumab</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Match the following: A. Medullary thyroid cancer i. Catecholamine B. Hepatoblastoma ii. AFP C. Choriocarcinoma iii. Calcitonin D. Pheochromocytoma iv. Beta HCG", "options": [{"label": "A", "text": "A-i, B-ii, C-iii, D-iv", "correct": false}, {"label": "B", "text": "A-iii, B-ii, C-iv, D-i", "correct": true}, {"label": "C", "text": "A-iv, B-iii, C-ii, D-i", "correct": false}, {"label": "D", "text": "A-ii, B-i, C-iii, D-iv", "correct": false}], "correct_answer": "B. A-iii, B-ii, C-iv, D-i", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:631px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tumor marker</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alpha-fetoprotein (AFP)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hepatocellular carcinoma (HCC)</li>\n<li><strong>Hepatoblastoma</strong></li>\n<li>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour (endodermal <span class=\"customMeta\" data-dictid=\"b0046463171692777198e0beea83e7\">sinus</span> tumour)</li>\n<li>Nonseminomatous <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumour of testis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>↑ AFP: abdominal wall defects, neural tube defects</li>\n<li>↓ AFP: associated with trisomy 21, 18, and 13 </li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>β-HCG </strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Nonseminomatous testicular germ cell tumours (<strong>choriocarcinoma</strong>, embryonal cell carcinoma, mixed germ cell tumour, seminoma)</li>\n<li>Ovarian cancer: choriocarcinoma (gestational trophoblastic disease)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Carcinoembryonic antigen (CEA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Colorectal cancer</li>\n<li>Pancreatic cancer</li>\n<li>Breast cancer</li>\n<li>Lung cancer (especially in non-small cell cancers)</li>\n<li>Gastric cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prostate-specific antigen (PSA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Prostate cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Benign prostatic hyperplasia</li>\n<li>Prostatitis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Calcitonin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> cancer</strong> (both <span class=\"customMeta\" data-dictid=\"a325d0c14e16927771992fe8a96758\">sporadic</span> and associated with MEN 1 and MEN 2)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alkaline phosphatase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Metastases to bone or liver</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Paget disease of the bone</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Catecholamine and metabolites</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Pheochromocytoma and related tumors</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Placental <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> phosphatase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Seminoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lactate dehydrogenase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ovarian cancer (dysgerminoma)</li>\n<li>Testicular <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumours (both seminoma and nonseminoma)</li>\n<li>Lymphomas</li>\n<li>Ewing's sarcoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Neuron specific enolase (NSE)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Neuroendocrine tumors</li>\n<li>Small cell lung cancer</li>\n<li>Carcinoid tumour</li>\n<li>Neuroblastoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CA 19–9 </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pancreatic adenocarcinoma</li>\n<li>Colon cancer</li>\n<li>Cholangiocarcinoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CA 15–3 and CA 27–29</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Breast cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>CA 125 </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ovarian carcinoma</li>\n<li>Other <span class=\"customMeta\" data-dictid=\"29c037b45616927771886c286ed45b\">gynecologic</span> malignancies</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>S-100 protein (S100A) and (S100B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Malignant melanoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>SMRP</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mesothelioma</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The type of cancer that rarely spreads through the lymphatic system is:", "options": [{"label": "A", "text": "Squamous cell carcinoma", "correct": false}, {"label": "B", "text": "Merkel cell carcinoma", "correct": false}, {"label": "C", "text": "Basal cell carcinoma", "correct": true}, {"label": "D", "text": "Malignant melanoma", "correct": false}], "correct_answer": "C. Basal cell carcinoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following shows breast necrosis and calcification?", "options": [{"label": "A", "text": "Comedo subtype of DCIS", "correct": true}, {"label": "B", "text": "Cribriform subtype of DCIS", "correct": false}, {"label": "C", "text": "Colloid carcinoma", "correct": false}, {"label": "D", "text": "Lobular carcinoma in situ", "correct": false}], "correct_answer": "A. Comedo subtype of DCIS", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"752b953a8c169277718425d3f6ad8c\">Comedo</span> subtype of DCIS\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "p53 regulates which phase of cell cycle?", "options": [{"label": "A", "text": "G1S", "correct": true}, {"label": "B", "text": "G2", "correct": false}, {"label": "C", "text": "G2M", "correct": false}, {"label": "D", "text": "S", "correct": false}], "correct_answer": "A. G1S", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - G1S\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 3-year-old boy was brought by his parents with concerns about being increasingly clumsy for the past 6 months. On examination, there is leukocoria with an absence of the red reflex in the left eye. As further workup reveals a tumour, the eye is enucleated, and the microscopic appearance is as shown in the image. Molecular analysis of the tumour indicates a loss of cell cycle control in the tumour cells. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Wilms tumor", "correct": false}, {"label": "B", "text": "Retinoblastoma", "correct": true}, {"label": "C", "text": "Ependymoma", "correct": false}, {"label": "D", "text": "Neuroblastoma", "correct": false}], "correct_answer": "B. Retinoblastoma", "question_images": ["https://image.prepladder.com/content/ci43XPaNpmpTQgtCtIKK1747121921.png"], "explanation_images": ["https://image.prepladder.com/content/fyIKpKNN6yNtDGWclWnN1747122861.png", "https://image.prepladder.com/content/cYLfKjQYZQ4vzndcZRpj1747122894.png", "https://image.prepladder.com/content/aGnzg90SNnBE6gKBkgW11747122925.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following enzymes is responsible for the immortality of cancer cells?", "options": [{"label": "A", "text": "Telomerase", "correct": true}, {"label": "B", "text": "Topoisomerase", "correct": false}, {"label": "C", "text": "Helicase", "correct": false}, {"label": "D", "text": "RNA polymerase", "correct": false}], "correct_answer": "A. Telomerase", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The lining epithelium of the respiratory tract of a middle-aged man who is a chronic smoker shows a change from columnar to stratified squamous epithelium, as depicted in the image below. The change is called what?", "options": [{"label": "A", "text": "Dysplasia", "correct": false}, {"label": "B", "text": "Hypertrophy", "correct": false}, {"label": "C", "text": "Atrophy", "correct": false}, {"label": "D", "text": "Metaplasia", "correct": true}], "correct_answer": "D. Metaplasia", "question_images": ["https://image.prepladder.com/content/iYBXswRDG6pmbitvKtnw1746517229.png"], "explanation_images": ["https://image.prepladder.com/content/pxZw8dZ9pfJmFULCVRR91746517303.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the fixation technique employed to examine fat in histopathology?", "options": [{"label": "A", "text": "IHC", "correct": false}, {"label": "B", "text": "Frozen section", "correct": true}, {"label": "C", "text": "Liquid paraffin", "correct": false}, {"label": "D", "text": "Formalin-fixed", "correct": false}], "correct_answer": "B. Frozen section", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/ZFLPxmyFO2l7LspBNNRb1746554029.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Technique / Tissue</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Fixative</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Electron microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Glutaraldehyde</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bone <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> (Trephine biopsy)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Zenker’s fluid</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>GI biopsy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Bouin’s fluid</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Brain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Formalin <span class=\"customMeta\" data-dictid=\"3719e878a4169277718109b2d3f67e\">ammonium</span> chloride</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Adrenal biopsy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Orth’s fluid</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pap smear</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Ethanol</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A woman was diagnosed with metastatic liver adenocarcinoma with CK7-, CK20+, and CDX1+ immunohistochemistry (IHC) markers. Which of the following is the most likely primary site of origin for this metastasis?", "options": [{"label": "A", "text": "Colon carcinoma", "correct": true}, {"label": "B", "text": "Breast carcinoma", "correct": false}, {"label": "C", "text": "Pancreatic carcinoma", "correct": false}, {"label": "D", "text": "Ovarian carcinoma", "correct": false}], "correct_answer": "A. Colon carcinoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Tumor Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>CK7</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>CK20</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>CDX1</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Colon carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">-</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">+</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Breast carcinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">-</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Pancreatic carcinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">-</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Ovarian carcinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">+</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">-</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\">-</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A pap smear taken from a patient revealed hyperchromatic nuclei, irregular nuclear borders, and a low maturation index involving the whole thickness but did not breach the basement membrane. What is the diagnosis?", "options": [{"label": "A", "text": "Dysplasia", "correct": true}, {"label": "B", "text": "Carcinoma", "correct": false}, {"label": "C", "text": "Metaplasia", "correct": false}, {"label": "D", "text": "Hyperplasia", "correct": false}], "correct_answer": "A. Dysplasia", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old female patient is diagnosed with pure red cell aplasia and a mediastinal mass. Which of the following is a likely cause?", "options": [{"label": "A", "text": "Thymoma", "correct": true}, {"label": "B", "text": "Non-Hodgkin lymphoma", "correct": false}, {"label": "C", "text": "Bronchogenic carcinoma", "correct": false}, {"label": "D", "text": "Germ cell tumour", "correct": false}], "correct_answer": "A. Thymoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/2guyo8TpeGUZnKppt53t1745411208.png", "https://image.prepladder.com/notes/hpHqSTQzK0KEFpwPTjWe1746444391.png", "https://image.prepladder.com/notes/Mdmc22Lfu0Ox21AjqGCw1746444425.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:1000px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Thymoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical features</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Mostly <span class=\"customMeta\" data-dictid=\"d1a9a79f701692777182066af09044\">asymptomatic</span> (small tumor), incidentally detected.</li>\n<li>It may <span class=\"customMeta\" data-dictid=\"c6486470671692777184e25019e1f0\">compress</span> the <span class=\"customMeta\" data-dictid=\"9ebd78bd471692777200ede69e8ed1\">trachea</span> (dyspnea), <span class=\"customMeta\" data-dictid=\"6a729a105a169277718788389dbeab\">esophagus</span> (dysphagia), <span class=\"customMeta\" data-dictid=\"c64e3a661b1692777197afc2ff7bca\">recurrent</span> laryngeal nerve (dysphonia or <span class=\"customMeta\" data-dictid=\"4da1fe73a71692777189ec55b7ed8c\">hoarseness</span> of voice), and superior <span class=\"customMeta\" data-dictid=\"3ddf6d5ea71692777201b70c8b9715\">vena</span> <span class=\"customMeta\" data-dictid=\"67544ba6ef16927771835d4641cc8f\">cava</span> (superior <span class=\"customMeta\" data-dictid=\"3ddf6d5ea71692777201b70c8b9715\">vena</span> <span class=\"customMeta\" data-dictid=\"67544ba6ef16927771835d4641cc8f\">cava</span> syndrome).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Investigations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>CT scan</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Investigation of choice</li>\n<li>It is used to determine the extent of the disease.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mohankumar Kurukumbi, Roger L Weir, Janaki Kalyanam, Mansoor Nasim, Annapurni Jayam-Trouth., CC BY 2.0 <https://creativecommons.org/licenses/by/2.0>, via Wikimedia Commons\" data-hash=\"\" data-license=\"CC BY 2.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Anterior_mediastinal_mass_thymoma_diagram.jpg\" data-tags=\"\" height=\"243\" src=\"https://image.prepladder.com/content/2guyo8TpeGUZnKppt53t1745411208.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Histology</strong> <strong>(definitive diagnosis)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Noninvasive thymomas:</strong> Medullary-type epithelial cells (elongated or spindle-shaped) or a mixture of medullary- and cortical-type epithelial cells (admixture of polygonal cortical-type epithelial cells and a denser <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> of thymocytes).</li>\n</ul>\n<p style=\"text-align:center\"> </p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Non-invasive Thymoma\" data-author=\"Roden AC\" data-hash=\"11973\" data-license=\"NA\" data-source=\"https://www.pathologyoutlines.com/topic/mediastinumthymoma.html\" data-tags=\"May2025\" height=\"225\" src=\"https://image.prepladder.com/notes/hpHqSTQzK0KEFpwPTjWe1746444391.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<ul>\n<li><strong>Invasive thymoma:</strong> Cytologically <span class=\"customMeta\" data-dictid=\"1bbae82f1f16927771824f797639fa\">benign</span> but locally invasive. The epithelial cells have abundant <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and rounded <span class=\"customMeta\" data-dictid=\"4b0fee14c816927772016e67cf3a13\">vesicular</span> <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> mixed with numerous thymocytes.</li>\n</ul>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Invasive Thymoma\" data-author=\"Librepath\" data-hash=\"11975\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Thymoma_type_B1_--_very_high_mag.jpg\" data-tags=\"May2025\" height=\"201\" src=\"https://image.prepladder.com/notes/Mdmc22Lfu0Ox21AjqGCw1746444425.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<ul>\n<li><strong>Cytokeratin</strong> (marker to distinguish <span class=\"customMeta\" data-dictid=\"76ecb330ba169277720078d984ef2a\">thymoma</span> from lymphoma; thymomas are positive for cytokeratin)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient with occupational exposure to benzene presents with repeated infections, easy fatigability, weight loss, and an evening rise in temperature. This occupational exposure will predispose him to which of the following cancers?", "options": [{"label": "A", "text": "Leukemia", "correct": true}, {"label": "B", "text": "Lung cancer", "correct": false}, {"label": "C", "text": "Bladder cancer", "correct": false}, {"label": "D", "text": "Skin cancer", "correct": false}], "correct_answer": "A. Leukemia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Risk of specific carcinomas related to specific exposure</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Risk of <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Occupation exposure </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Lungs (Option B ruled out) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Arsenic, beryllium, cadmium, chromium, Asbestosis, Silica, radon, Nickel, and <span class=\"customMeta\" data-dictid=\"5bdef37bf01692777182f5780db753\">aromatic</span> hydrocarbon.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Bladder (Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Benzidine,</strong> Auramine, Beta-naphthylamine, <span class=\"customMeta\" data-dictid=\"d420f34d5816927771943f346531fc\">Para</span> amino-diphenyl, Magenta.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Liver </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Vinyl chloride</strong>, Arsenic.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Leukaemia </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Benzene</strong>, <span class=\"customMeta\" data-dictid=\"8e2fdef08316927771877389af9cc7\">ethylene</span> oxide.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Skin (Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Arsenic, ionising radiation, <span class=\"customMeta\" data-dictid=\"ce3cc4c1bd16927771967fba44f261\">Polycyclic</span> <span class=\"customMeta\" data-dictid=\"5bdef37bf01692777182f5780db753\">aromatic</span> hydrocarbons.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Scrotum </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Polycyclic <span class=\"customMeta\" data-dictid=\"5bdef37bf01692777182f5780db753\">aromatic</span> hydrocarbons.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true? BRCA1 is an oncogene HER2neu is amplified only in a fraction of breast cancer EGFR+ is seen in non-small cell lung cancer N-MYC is a tumor suppressor gene", "options": [{"label": "A", "text": "1, 2", "correct": false}, {"label": "B", "text": "1, 3", "correct": false}, {"label": "C", "text": "2, 3", "correct": true}, {"label": "D", "text": "All of these", "correct": false}], "correct_answer": "C. 2, 3", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The human papillomavirus inactivates the Rb gene by which of the following proteins?", "options": [{"label": "A", "text": "E6", "correct": false}, {"label": "B", "text": "E7", "correct": true}, {"label": "C", "text": "L1", "correct": false}, {"label": "D", "text": "L2", "correct": false}], "correct_answer": "B. E7", "question_images": [], "explanation_images": [], "explanation": "<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Oncogenic Activities of E6 Protein</p>\n<p>(Option A ruled out)</p>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Oncogenic Activities of E7 Protein</p>\n<p>(Option B)</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Binds to and promotes <span class=\"customMeta\" data-dictid=\"d395f610461692777185cbe8b8806d\">degradation</span> of p53 → Impairs cell growth and <span class=\"customMeta\" data-dictid=\"4bfa3e6f2c1692777181c53b124cf7\">apoptosis</span> regulation.</li>\n<li>Stimulates expression of TERT (telomerase reverse transcriptase) → Facilitates <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> immortalisation by maintaining <span class=\"customMeta\" data-dictid=\"b9d804af7716927772001ebdb234b1\">telomere</span> length.</li>\n</ul>\n</td>\n<td colspan=\"1\" rowspan=\"1\">\n<ul>\n<li>Disrupts interaction between RB protein and E2F <span class=\"customMeta\" data-dictid=\"739aa4b5ea1692777200a636ee075f\">transcription</span> factors</li>\n<li>Inactivates <span class=\"customMeta\" data-dictid=\"21f7c13ced1692777183f46684de3a\">CDK</span> inhibitors (e.g., p21 and p27).</li>\n<li>Activates cyclins A and E </li>\n</ul>\n<p> </p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true about anaplasia?", "options": [{"label": "A", "text": "Loss of cohesion between cells", "correct": false}, {"label": "B", "text": "Loss of differentiation", "correct": true}, {"label": "C", "text": "Change of epithelium type", "correct": false}, {"label": "D", "text": "Benign and fully reversible", "correct": false}], "correct_answer": "B. Loss of differentiation", "question_images": [], "explanation_images": [], "explanation": "\n<table align=\"left\" cellspacing=\"0\" style=\"border-collapse:collapse; width:708px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Metaplasia </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Dysplasia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Anaplasia </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Differentiated cell</p>\n<p>type (epithelial or mesenchymal) is replaced by another cell type.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Disordered growth and loss of architectural orientation of cells.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Lack of <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> <span class=\"customMeta\" data-dictid=\"55a682d72e16927771865bb4855ba3\">differentiation</span> and organisation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Nature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Adaptive response to stress or injury.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Preneoplastic</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Associated with <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> transformation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Reversibility</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Reversible</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Reversible in early stages</p>\n<p>(irreversible if whole</p>\n<p>the <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> is involved).</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Irreversible</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pleomorphism</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Absent</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Present in low-grade</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Present in high-grade</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Nuclear-to-cytoplasmic ratio</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Normal (1:4 to 1:6)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased (↑)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Increased (↑↑↑)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Mitotic figures</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Absent/minimal at normal places.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Typical <span class=\"customMeta\" data-dictid=\"e0da80f7b91692777192668c299922\">mitotic figures</span> present at <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> places.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Atypical, bizarre mitotic figures</p>\n<p>present at <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> places.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Basement <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> integrity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Intact</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Intact</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Breached</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Example</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Barret’s oesophagus,</p>\n<p>myositis ossificans</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Cervical <span class=\"customMeta\" data-dictid=\"984733db481692777186757cce6e6b\">dysplasia</span> of</p>\n<p>squamous cells</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Carcinoma of the cervix, <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> oesophagus</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the malignancies in Column A with the genes in Column B: Column A Column B 1. Pleomorphic adenoma a. Rb 2. Burkitt lymphoma b. N-MYC 3. Neuroblastoma c.C-MYC 4. Retinoblastoma d. PLAG1", "options": [{"label": "A", "text": "1-c, 2-b, 3-d, 4-a", "correct": false}, {"label": "B", "text": "1-b, 2-c, 3-d, 4-a", "correct": false}, {"label": "C", "text": "1-d, 2-c, 3-b, 4-a", "correct": true}, {"label": "D", "text": "1-b, 2-d, 3-c, 4-a", "correct": false}], "correct_answer": "C. 1-d, 2-c, 3-b, 4-a", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:297px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Column A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Gene</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Pleomorphic adenoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>PLAG1</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Burkitt lymphoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>cMyc</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Neuroblastoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>nMyc</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Retinoblastoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Rb</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a component of MEN type II syndrome?", "options": [{"label": "A", "text": "Medullary thyroid carcinoma", "correct": false}, {"label": "B", "text": "Marfanoid habitus", "correct": false}, {"label": "C", "text": "Mucosal neuromas", "correct": false}, {"label": "D", "text": "Pancreatic adenoma", "correct": true}], "correct_answer": "D. Pancreatic adenoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:797px\">\n<tbody>\n<tr>\n<td colspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types of Multiple <span class=\"customMeta\" data-dictid=\"d8216cf7571692777187baa94b8612\">Endocrine</span> Neoplasia</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MEN Type I</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MEN Type II</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MEN Type III</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>MEN Type IV</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cause</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Defect of <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> <strong>11q13</strong> causing <strong>MEN 1 gene <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> </strong></li>\n<li>Also called <strong>Wermer’s syndrome</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Defect of chr.10 leading to <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> of <strong>RET gene</strong></li>\n<li>Also called <strong>Sipple’s syndrome </strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Also called <strong>MEN II B</strong>, it is a <strong>variant of <span class=\"customMeta\" data-dictid=\"05e8c1df0d1692777201c9acee8b1f\">Type 2</span> </strong>MEN</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Defect of chr.12 causing <strong>CDKN1B gene</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tumors</strong></p>\n<p><strong>Included</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parathyroid adenoma</strong></p>\n<p>(most common)</p>\n<ul>\n<li>It presents with primary <span class=\"customMeta\" data-dictid=\"a21c150dc716927771893624a49628\">hyperparathyroidism</span> (↑ <span class=\"customMeta\" data-dictid=\"5eff25235516927771968c590529d7\">PTH</span> and ↑ Ca)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parathyroid <span class=\"customMeta\" data-dictid=\"c3c9726266169277718021f4f0fa16\">adenoma</span> (</strong>most common, and <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> can be normal)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Medullary <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> (</strong>most common)</p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parathyroid <span class=\"customMeta\" data-dictid=\"c3c9726266169277718021f4f0fa16\">adenoma</span> (</strong>Presents as hypercalcemia)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pancreatic adenoma</strong></p>\n<p><strong>(Option D)</strong></p>\n<ul>\n<li>Presents as <strong>Gastrinoma or Zollinger-Ellison syndrome</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pheochromocytoma</strong>.</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pheochromocytoma </strong>(Most important <span class=\"customMeta\" data-dictid=\"9167b944ea169277718582367e0915\">criterion</span> for both <span class=\"customMeta\" data-dictid=\"e48bb8abfa1692777192e3fa06774f\">MEN</span> 2 and <span class=\"customMeta\" data-dictid=\"e48bb8abfa1692777192e3fa06774f\">MEN</span> 3): Presents with elevated blood pressure.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pituitary adenoma: </strong>Prolactinoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pituitary adenoma: </strong>Prolactinoma, causing <span class=\"customMeta\" data-dictid=\"5d8a1011e31692777181375a96c9c8\">amenorrhea</span> and Infertility</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinoma</strong></p>\n<ul>\n<li>Calcitonin is the <span class=\"customMeta\" data-dictid=\"19ae68448b16927772016d48bd7fc3\">tumor marker</span> present</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reproductive <span class=\"customMeta\" data-dictid=\"1a1307223f16927772017a994bfc39\">tract</span> tumors</strong></p>\n<ul>\n<li>Testicular tumors</li>\n<li>Neuroendocrine tumor (Cervix)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Angiofibroma</li>\n<li>Collagenoma</li>\n<li>Adrenocortical tumor</li>\n<li>Carcinoid tumors/Argentaffinoma</li>\n<li>Pheochromocytoma (only in 1%)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Congenital aganglionosis,</li>\n<li>Hirschsprung disease</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Marfanoid habitus</li>\n</ul>\n<p><strong>(Option B)</strong></p>\n<ul>\n<li>Medullated corneal nerve fibers</li>\n<li>Mucosal neuromas</li>\n</ul>\n<p><strong>(Option C)</strong></p>\n<ul>\n<li>Megacolon and Multiple diverticulae</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occasionally with</p>\n<ul>\n<li>Renal tumor</li>\n<li>Adrenal tumor</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Epithelial-mesenchymal transition induced by which pair of transcription factors?", "options": [{"label": "A", "text": "TF IIA &amp; TF IIB", "correct": false}, {"label": "B", "text": "Cathepsin &amp; MMP 8", "correct": false}, {"label": "C", "text": "SNAIL &amp; TWIST", "correct": true}, {"label": "D", "text": "STAT-5 &amp; HIF-1 alpha", "correct": false}], "correct_answer": "C. SNAIL & TWIST", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the tumour marker for a carcinoid tumour?", "options": [{"label": "A", "text": "Beta-HCG", "correct": false}, {"label": "B", "text": "Calcitonin", "correct": false}, {"label": "C", "text": "5-HIAA", "correct": true}, {"label": "D", "text": "Alpha-fetoprotein", "correct": false}], "correct_answer": "C. 5-HIAA", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:631px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Tumor marker</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Associated conditions</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Alpha-fetoprotein (AFP) (Option D ruled out)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Hepatocellular <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (HCC)</li>\n<li>Hepatoblastoma</li>\n<li>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour (endodermal <span class=\"customMeta\" data-dictid=\"b0046463171692777198e0beea83e7\">sinus</span> tumour)</li>\n<li>Nonseminomatous <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumour of testis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>↑ AFP: <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> wall defects, <span class=\"customMeta\" data-dictid=\"b00388be25169277719369b3ab059f\">neural</span> tube defects</li>\n<li>↓ AFP: associated with <span class=\"customMeta\" data-dictid=\"5e54fdc4d3169277720003f231621d\">trisomy</span> 21, 18, and 13</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>β-HCG (Option A ruled out)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Nonseminomatous testicular <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumours (choriocarcinoma, embryonal cell carcinoma, mixed <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumour, seminoma)</li>\n<li>Ovarian cancer: <span class=\"customMeta\" data-dictid=\"209abd0cee16927771843bab0de87c\">choriocarcinoma</span> (gestational trophoblastic disease)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Carcinoembryonic <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> (CEA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Colorectal cancer</li>\n<li>Pancreatic cancer</li>\n<li>Breast cancer</li>\n<li>Lung cancer (especially in non-small cell cancers)</li>\n<li>Gastric cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Prostate-specific <span class=\"customMeta\" data-dictid=\"782b31281a1692777181708484c1d1\">antigen</span> (PSA)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Prostate cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Benign prostatic hyperplasia</li>\n<li>Prostatitis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Calcitonin (Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Medullary <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> cancer (both <span class=\"customMeta\" data-dictid=\"a325d0c14e16927771992fe8a96758\">sporadic</span> and associated with <span class=\"customMeta\" data-dictid=\"e48bb8abfa1692777192e3fa06774f\">MEN</span> 1 and <span class=\"customMeta\" data-dictid=\"e48bb8abfa1692777192e3fa06774f\">MEN</span> 2)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Alkaline phosphatase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Metastases to bone or liver</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Paget disease of the bone</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Placental <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> phosphatase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Seminoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Lactate dehydrogenase</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Ovarian cancer (dysgerminoma)</li>\n<li>Testicular <span class=\"customMeta\" data-dictid=\"b3623bc67216927771889eb144d9ed\">germ</span> cell tumours (both <span class=\"customMeta\" data-dictid=\"0b7129b26c16927771988bb64b78ef\">seminoma</span> and nonseminoma)</li>\n<li>Lymphomas</li>\n<li>Ewing's sarcoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Neuron specific <span class=\"customMeta\" data-dictid=\"92417be2b316927771877be984d041\">enolase</span> (NSE)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Neuroendocrine tumors</li>\n<li>Small cell lung cancer</li>\n<li>Carcinoid tumour</li>\n<li>Neuroblastoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>CA 19–9 </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Pancreatic adenocarcinoma</li>\n<li>Colon cancer</li>\n<li>Cholangiocarcinoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>CA 15–3 and CA 27–29</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Breast cancer</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>CA 125 </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Ovarian carcinoma</li>\n<li>Other <span class=\"customMeta\" data-dictid=\"29c037b45616927771886c286ed45b\">gynecologic</span> malignancies</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>S-100 protein (S100A) and (S100B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Malignant melanoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>SMRP</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Mesothelioma</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is true about proto-oncogenes? KIT has decreased expression via the tyrosine kinase signalling pathway in GIST. KRAS mutation is more commonly associated with small-cell lung cancer. ERBB2 is overexpressed in association with breast carcinomas. PDGFR-β has suppressed expression in colorectal cancer.", "options": [{"label": "A", "text": "2 only", "correct": false}, {"label": "B", "text": "3 only", "correct": true}, {"label": "C", "text": "1 and 4", "correct": false}, {"label": "D", "text": "2 and 3", "correct": false}], "correct_answer": "B. 3 only", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:661px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proto-oncogene for growth factor receptor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Associated tumour</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ERBB (EGFR) </strong></p>\n<p><strong>ERBB2 (HER2) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Adenocarcinoma of lung</li>\n<li>Amplification <strong>Breast carcinoma</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>FLT3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Leukaemia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>RET</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Familial <span class=\"customMeta\" data-dictid=\"0a36e18386169277719259641cf29b\">medullary</span> <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinomas</li>\n<li>Multiple <span class=\"customMeta\" data-dictid=\"d8216cf7571692777187baa94b8612\">endocrine</span> <span class=\"customMeta\" data-dictid=\"e212826c171692777193374ca34435\">neoplasia</span> 2A and B,</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ALK</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Adenocarcinoma of lung</li>\n<li>Neuroblastoma</li>\n<li>Certain lymphomas</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>KIT</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gastrointestinal stromal tumors, Seminomas</li>\n<li>Acute <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">Myeloid</span> Leukaemia (AML)</li>\n<li>Mastocytosis</li>\n<li>Melanoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PDGFR-B</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Brain tumours</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old male presents with a testicular mass, and a gross image of the mass is provided. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Teratoma", "correct": false}, {"label": "B", "text": "Seminoma", "correct": true}, {"label": "C", "text": "Yolk sac tumour", "correct": false}, {"label": "D", "text": "Choriocarcinoma", "correct": false}], "correct_answer": "B. Seminoma", "question_images": ["https://image.prepladder.com/notes/MNMZZlW7sZT2JM3bgzHt1747643957.png"], "explanation_images": ["https://image.prepladder.com/notes/MNMZZlW7sZT2JM3bgzHt1747643957.png", "https://image.prepladder.com/notes/rqNsztuOrisG2nA2pbYF1747650497.png", "https://image.prepladder.com/content/iP8PlrTc7v4e0QIwmIWl1747309672.png", "https://image.prepladder.com/content/a2PYLn2jiN1XhPtEwjvH1747309672.png", "https://image.prepladder.com/content/AuVKTEVozdOwqnS2wMQU1747309672.png", "https://image.prepladder.com/content/4T9AcYrB7R3y5Ao5AkVv1747309672.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following features does not distinguish between necrosis and apoptosis?", "options": [{"label": "A", "text": "Enzymatic degradation", "correct": false}, {"label": "B", "text": "Association with underlying pathology", "correct": true}, {"label": "C", "text": "Lipid change", "correct": false}, {"label": "D", "text": "Intact membrane", "correct": false}], "correct_answer": "B. Association with underlying pathology", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Necrosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Apoptosis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cell Size</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Enlarged (swelling)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Reduced (shrinkage)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Nucleus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Pyknosis, karyorrhexis, karyolysis</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Fragmentation into nucleosome-size fragments</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Plasma Membrane</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Disrupted</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Intact; altered structure, particularly <span class=\"customMeta\" data-dictid=\"a99114a6c216927771916f45ffc66c\">lipid</span> orientation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Cellular Contents</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Enzymatic breakdown; potential leakage</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Intact; released within apoptotic bodies</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Adjacent Inflammation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Common</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Absent</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Physiological or <span class=\"customMeta\" data-dictid=\"c0c247b89916927771948bc5e6d39c\">Pathological</span> Role</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Typically <span class=\"customMeta\" data-dictid=\"c0c247b89916927771948bc5e6d39c\">pathological</span> (resulting from <span class=\"customMeta\" data-dictid=\"ee77d507701692777190bfcf47b497\">irreversible</span> cell injury)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Primarily physiological, serving to eliminate unwanted cells; may become <span class=\"customMeta\" data-dictid=\"c0c247b89916927771948bc5e6d39c\">pathological</span> after certain types of <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> damage, notably DNA injury</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the given mutations with the respective cancers: A. K-RAS Myeloproliferative neoplasm B. KIT 2. Adenocarcinoma C. JAK 2 3. Pancreatic cancer D. ALK 4. GIST", "options": [{"label": "A", "text": "A-3, B-4, C-1, D-2", "correct": true}, {"label": "B", "text": "A-2, B-3, C-4, D-1", "correct": false}, {"label": "C", "text": "A-1, B-3, C-2, D-4", "correct": false}, {"label": "D", "text": "A-2, B-4, C-3, D-1", "correct": false}], "correct_answer": "A. A-3, B-4, C-1, D-2", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:426px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p>A. K-RAS</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p>Pancreatic cancer</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>B. KIT</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>GIST</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>C. JAK 2</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Myeloproliferative neoplasm</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>D. ALK</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Adenocarcinoma</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:622px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Mutation in proto-oncogenes <span class=\"customMeta\" data-dictid=\"b989cb3b0d1692777187dd7965b4d3\">encoding</span> for cancer</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Proto-oncogene for growth factor receptor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Associated tumour</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>ERBB (EGFR) </strong></p>\n<p><strong>ERBB2 (HER2) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Adenocarcinoma of lung</li>\n<li>Amplification Breast carcinoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>FLT3</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Leukaemia</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>RET</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Familial <span class=\"customMeta\" data-dictid=\"0a36e18386169277719259641cf29b\">medullary</span> <span class=\"customMeta\" data-dictid=\"799202e6fe16927772009a1501b0a8\">thyroid</span> carcinomas</li>\n<li>Multiple <span class=\"customMeta\" data-dictid=\"d8216cf7571692777187baa94b8612\">endocrine</span> <span class=\"customMeta\" data-dictid=\"e212826c171692777193374ca34435\">neoplasia</span> 2A and B,</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>ALK</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Adenocarcinoma of lung</li>\n<li>Neuroblastoma</li>\n<li>Certain lymphomas</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>KIT</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Gastrointestinal stromal tumors, Seminomas</li>\n<li>Acute Myeloid Leukaemia (AML)</li>\n<li>Mastocytosis</li>\n<li>Melanoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>PDGFR-B</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Brain tumours</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>JAK-2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Polycythemia vera</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>BRAF</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Hairy cell leukemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>N Myc</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Neuroblastoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>C Myc</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Burkitt's lymphoma</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Subtypes of RAS are associated with malignancies</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Signal Transduction Protein<br/>\n\t\t\t(GTP-binding proteins)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Malignancies</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>KRAS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Colon, Lung, Pancreatic tumours</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>HRAS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Bladder and <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">kidney</span> tumors</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>NRAS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Melanomas, AML</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>GNAS</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Pituitary adenoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>GNAQ</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Uveal melanoma</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Asbestos exposure may be associated with which of the following malignancies?", "options": [{"label": "A", "text": "Mesothelioma", "correct": true}, {"label": "B", "text": "Acute myeloid leukemia", "correct": false}, {"label": "C", "text": "Hepatic angiosarcoma", "correct": false}, {"label": "D", "text": "Skin carcinoma", "correct": false}], "correct_answer": "A. Mesothelioma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/wMDe8J0fj3Yo98YPViQK1746428706.png", "https://image.prepladder.com/content/JfO6j0ubk7mfODPjSqpg1746428714.png", "https://image.prepladder.com/content/V3KNqvlbMYz7zQj9reGa1746428727.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Mesothelioma</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>A rare cancer arising from mesothelial cells that most commonly affects the pleura.</li>\n<li>It can also affect the peritoneum, <span class=\"customMeta\" data-dictid=\"56ab21797f16927771954b343891ef\">pericardium</span> and <span class=\"customMeta\" data-dictid=\"35814a93301692777201bab0f52c19\">tunica</span> vaginalis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aetiology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Asbestos: <span class=\"customMeta\" data-dictid=\"9f56633f181692777192f07ed38b1a\">Mesothelioma</span> is the most specific asbestos-associated cancer</li>\n<li>It is not associated with smoking</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Advanced pleural <span class=\"customMeta\" data-dictid=\"9f56633f181692777192f07ed38b1a\">mesothelioma</span> can cause extensive pleural <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> and thickening, making the affected side rigid and immobile.</li>\n<li>Later stages fix the <span class=\"customMeta\" data-dictid=\"be2aea1ed01692777192b46ee482a3\">mediastinum</span> in place due to pleural thickening and fibrosis.</li>\n<li>The <span class=\"customMeta\" data-dictid=\"1014e4cf5e169277719246e0ca91df\">mediastinal</span> shift is not a characteristic feature of mesothelioma.</li>\n<li>M/C <span class=\"customMeta\" data-dictid=\"2878159c181692777185d495ce6244\">cytogenetic</span> <span class=\"customMeta\" data-dictid=\"e7ed1a964716927771801ab913204a\">abnormality</span> in mesothelioma: <strong>Homozygous <span class=\"customMeta\" data-dictid=\"cf1e8ec6121692777185eba2630061\">deletion</span> of <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 9p</strong>, leading to <strong>loss</strong> of tumour <span class=\"customMeta\" data-dictid=\"92427347f51692777199a762a91d21\">suppressor</span> gene - <strong>CDKN2A.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Progressive dyspnea, chest pain, weight loss, chronic cough, hemoptysis.</li>\n<li>Decreased <span class=\"customMeta\" data-dictid=\"baa424d2de16927771836afd73785b\">breath sounds</span> and <span class=\"customMeta\" data-dictid=\"e452a3bf5716927771867e7ea9b4da\">dullness</span> to <span class=\"customMeta\" data-dictid=\"4818bebdf31692777195cc835c12d4\">percussion</span> (due to pleural <span class=\"customMeta\" data-dictid=\"73909075e71692777187f08d3c9b7e\">effusion</span> or thickening).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>CT scan:</strong> <strong>Pleural thickening, effusion, or frozen hemithorax</strong> (not causing a <span class=\"customMeta\" data-dictid=\"1014e4cf5e169277719246e0ca91df\">mediastinal</span> shift in the presence of effusion)</li>\n<li>Confirmed by <strong>biopsy:</strong>\n<ul>\n<li><strong>Epithelioid mesothelioma</strong> shows tubules, nests, or <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> structures with uniform round to <span class=\"customMeta\" data-dictid=\"74793d564816927771943ae4ba74b3\">oval</span> <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> cytoplasm.</li>\n<li><strong>Sarcomatoid mesothelioma</strong> consists of spindle-shaped cells resembling fibrosarcoma.</li>\n<li><strong>Biphasic mesothelioma</strong> displays a mixture of both patterns.</li>\n</ul>\n</li>\n<li><strong>Specific</strong> <strong>markers</strong> for mesothelioma:\n\t\t\t\t<ul>\n<li>Calretinin</li>\n<li>Epithelial <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> antigen</li>\n<li>Cytokeratin</li>\n<li>Mesothelin</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Poor (median survival of 9-21 months).</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Yale Rosen\" data-hash=\"\" data-license=\"CC BY SA 2.0\" data-source=\"https://www.flickr.com/photos/pulmonary_pathology/3954797985/in/photostream/\" data-tags=\"\" height=\"488\" src=\"https://image.prepladder.com/content/wMDe8J0fj3Yo98YPViQK1746428706.png\" width=\"312\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align: center;\"><strong>Mesothelioma- Gross</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Malignant_epithelioid_mesothelioma_2-2_-_high_mag.jpg#/media/File:Malignant_epithelioid_mesothelioma_-_high_mag.jpg\" data-tags=\"\" height=\"552\" src=\"https://image.prepladder.com/content/JfO6j0ubk7mfODPjSqpg1746428714.png\" width=\"370\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p style=\"text-align: center;\"><strong>Mesothelioma- H & E stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Malignant_epithelioid_mesothelioma_2-2_-_high_mag.jpg#/media/File:Malignant_epithelioid_mesothelioma_-_calretinin_-_intermed_mag.jpg\" data-tags=\"\" height=\"205\" src=\"https://image.prepladder.com/content/V3KNqvlbMYz7zQj9reGa1746428727.png\" width=\"329\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p style=\"text-align: center;\"><strong>Mesothelioma- Calretinin stain</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 70-year-old male comes with complaints of hip pain. An X-ray of the hip shows lytic lesions and elevated serum calcium levels. Bone marrow plasma cells are 42%, and the cells seen are given in the image below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Multiple myeloma", "correct": true}, {"label": "B", "text": "CLL", "correct": false}, {"label": "C", "text": "ALL", "correct": false}, {"label": "D", "text": "CML", "correct": false}], "correct_answer": "A. Multiple myeloma", "question_images": ["https://image.prepladder.com/content/9Vc5rl4xIhe4QAzKHUn01746429663.png"], "explanation_images": ["https://image.prepladder.com/content/4RC2sfX0XclRDv29VECz1746429715.png", "https://image.prepladder.com/content/7a7eUF6FTl9GeFhVvkmo1746429727.png", "https://image.prepladder.com/content/3DyLpCxcbIyGvAbtU5X21746429739.png", "https://image.prepladder.com/content/ZTE8IJosfAZZNemlfZic1746429749.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The following picture shows a lymph node biopsy of a 30-year-old male with cervical lymphadenopathy. The diagnosis is:", "options": [{"label": "A", "text": "Acute myeloid leukemia (AML)", "correct": false}, {"label": "B", "text": "Hodgkin disease", "correct": true}, {"label": "C", "text": "Human papillomavirus (HPV)", "correct": false}, {"label": "D", "text": "Chronic lymphocytic leukemia (CLL)", "correct": false}], "correct_answer": "B. Hodgkin disease", "question_images": ["https://image.prepladder.com/content/MhzsG7ZX7zVOO8GAJ5On1746429956.png"], "explanation_images": ["https://image.prepladder.com/content/s5axcuoBNkNq64mvyVYZ1746430089.png", "https://image.prepladder.com/content/q4rq6GbiJQy34qRoLwhm1746430100.png", "https://image.prepladder.com/content/816sNER83l4XSaWIIxX01746430109.png", "https://image.prepladder.com/content/EJtDGcbPBuzWydvIzAG61746430120.png", "https://image.prepladder.com/content/8rB0GX8QxjzSZNBdxk6Z1746430134.png", "https://image.prepladder.com/content/0gHtW685QQmuZtjP11eB1746430144.png", "https://image.prepladder.com/content/Mrm9U2OwQsr3TsjkZYes1746430154.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Histopathological variants of Hodgkin’s Lymphoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>1. Mononuclear cells</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Emanuela Vaccher,Annunziata Gloghini,Caterina Volpi Antonino Carbone\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://www.researchgate.net/figure/Hodgkin-lymphoma-HL-in-individuals-infected-by-HIV-Hodgkin-and-Reed-Sternberg-HRS_fig3_363317499\" data-tags=\"\" height=\"400\" src=\"https://image.prepladder.com/content/s5axcuoBNkNq64mvyVYZ1746430089.png\" width=\"466\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Single <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> with a large, inclusion-like nucleolus</strong> with abundant cytoplasm.</li>\n<li>Seen in Mixed Cellularity Hodgkin Lymphoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>2. Popcorn cells</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Nodular_lymphocyte_predominant_Hodgkin_lymphoma#/media/File:Popcorn_cell_in_nodular_lymphocyte_predominant_Hodgkin_lymphoma_-_very_high_mag_cropped.jpg\" data-tags=\"\" height=\"291\" src=\"https://image.prepladder.com/content/q4rq6GbiJQy34qRoLwhm1746430100.png\" width=\"395\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cells with <strong>multiple infolded nuclear membranes, small nucleoli, fine chromatin,</strong> and abundant pale cytoplasm.</li>\n<li>Seen in <span class=\"customMeta\" data-dictid=\"bfa856c77716927771939978c5afd0\">Nodular</span> <span class=\"customMeta\" data-dictid=\"c605d4126116927771916c2002638e\">lymphocyte</span> - Predominant Hodgkin lymphoma.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>3. Reed-sternberg cell</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Ed Uthman, MD\" data-hash=\"\" data-license=\"CC-BY-SA 2.0\" data-source=\"https://www.instagram.com/p/CncKr1cMheC/\" data-tags=\"\" height=\"262\" src=\"https://image.prepladder.com/content/816sNER83l4XSaWIIxX01746430109.png\" width=\"397\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is characterised by <strong>two nuclear lobes, large inclusion-like nucleoli</strong>, and abundant <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and is typically surrounded by lymphocytes, macrophages, and an eosinophil.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>4. Lacunar cells</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Humpath\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Nodular_lymphocyte_predominant_Hodgkin_lymphoma_2014_4.png\" data-tags=\"\" height=\"269\" src=\"https://image.prepladder.com/content/EJtDGcbPBuzWydvIzAG61746430120.png\" width=\"466\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Typically found in the <span class=\"customMeta\" data-dictid=\"bfa856c77716927771939978c5afd0\">nodular</span> <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">sclerosis</span> subtype.</li>\n<li><strong>Nuclei are more delicate, folded, or multilobate. </strong></li>\n<li>Abundant pale <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> often gets disrupted during sectioning, creating an appearance where the <span class=\"customMeta\" data-dictid=\"ff628904401692777193c8a9f9159e\">nucleus</span> sits in an empty space (lacuna).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Subtype of Hodgkin lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Reed-Sternberg Cell Variant</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nodular Sclerosis (NSHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lacunar Cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mixed Cellularity (MCHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnostic Reed-Sternberg Cells and Mononuclear Variants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphocyte-Rich (LRHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnostic Reed-Sternberg Cells and Mononuclear Variants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphocyte Depletion (LDHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diagnostic Reed-Sternberg Cells and Variants</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nodular Lymphocyte-Predominant (NLPHL)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lymphohistiocytic (L&H) Cells</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The type of cancer that rarely spreads through the lymphatic system is:", "options": [{"label": "A", "text": "Squamous cell carcinoma", "correct": false}, {"label": "B", "text": "Merkel cell carcinoma", "correct": false}, {"label": "C", "text": "Basal cell carcinoma", "correct": true}, {"label": "D", "text": "Malignant melanoma", "correct": false}], "correct_answer": "C. Basal cell carcinoma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hematogenous spread</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymphatic spread</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Transcoelomic spread</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Veins are more <span class=\"customMeta\" data-dictid=\"607476ab371692777196d0cb2f13bc\">prone</span> to invasion than arteries due to their thinner walls.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tumours use existing <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> vessels at their margins. Follows natural routes of <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> drainage.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tumour invades the <span class=\"customMeta\" data-dictid=\"5ce9b6c57f1692777198cdc854b76a\">serosal</span> wall of the coelomic cavity, releasing tumour fragments into coelomic fluid, which is implanted elsewhere in the body cavity.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #6aa84f; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in <strong>most of the sarcomas.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in <strong>most carcinomas.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Seen in<strong> </strong><strong>Krukenberg tumour </strong>in the <span class=\"customMeta\" data-dictid=\"7b1a7ff355169277719401475de6fb\">ovary</span> due to <span class=\"customMeta\" data-dictid=\"d3251bfb0b1692777192b069d7ba4a\">metastasis</span> from <span class=\"customMeta\" data-dictid=\"12347b15191692777188bc86d226e1\">gastric</span> <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> to the ovary.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Exceptions:</strong></p>\n<ul>\n<li>Synovial sarcoma</li>\n<li>Rhabdomyosarcoma</li>\n</ul>\n<p><br/>\n\t\t\t*These tumours are spread by the<strong> <span class=\"customMeta\" data-dictid=\"4fb6bd90f016927771918d4a2993ed\">lymphatic</span> route.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Exceptions:</strong></p>\n<ul>\n<li>HCC</li>\n<li>RCC</li>\n<li>Follicular <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> of the thyroid</li>\n<li>Choriocarcinoma</li>\n</ul>\n<p><br/>\n\t\t\t*These tumours are spread by a <strong>hematogenous route.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following microscopic appearance and the respective tumour in which they are seen Microscopic appearance Tumor 1. Schiller Duval bodies a. Krukenberg tumor 2. Presence of teeth, hair, etc B. Granulosa cell tumor 3. Signet ring cells C. Yolk sac tumour 4. Call-Exner bodies d. Teratoma", "options": [{"label": "A", "text": "1-c, 2-a, 3-d, 4-b", "correct": false}, {"label": "B", "text": "1-b, 2-c, 3-a, 4-d", "correct": false}, {"label": "C", "text": "1-d, 2-b, 3-c, 4-a", "correct": false}, {"label": "D", "text": "1-c, 2-d, 3-a, 4-b", "correct": true}], "correct_answer": "D. 1-c, 2-d, 3-a, 4-b", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/E6GhcTVuLywvYf5MYCjc1745392923.png", "https://image.prepladder.com/notes/0XocS5gc2aYfRuwa4ZZ11745393138.png", "https://image.prepladder.com/notes/tqgUZaYr70rxBBiwgPQm1746706971.png", "https://image.prepladder.com/notes/hrjMf6rjOg5TIQ1Fl5jS1745393227.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:546px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Microscopic Appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Tumor</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Schiller Duval bodies</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Yolk <span class=\"customMeta\" data-dictid=\"59ae5630de16927771988a866d1dea\">sac</span> tumour</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Presence of teeth, hair, etc.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Teratoma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Signet ring cells</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Kruckenberg tumor</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Call-Exner bodies</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Granulosa cell tumor</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Neurosecretory bodies are seen in all of the following, except:", "options": [{"label": "A", "text": "Medullary thyroid carcinoma", "correct": false}, {"label": "B", "text": "Pituitary adenoma", "correct": false}, {"label": "C", "text": "Paraganglioma", "correct": false}, {"label": "D", "text": "Adrenal cortical tumour", "correct": true}], "correct_answer": "D. Adrenal cortical tumour", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "NARP syndrome belongs to:", "options": [{"label": "A", "text": "Lysosomal storage disorder", "correct": false}, {"label": "B", "text": "Mitochondrial function disorder", "correct": true}, {"label": "C", "text": "Glycogen storage disorder", "correct": false}, {"label": "D", "text": "Golgi body transport disorder", "correct": false}], "correct_answer": "B. Mitochondrial function disorder", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Mitochondrial fu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following components is typically not included in immunohistochemistry for acute lymphoblastic leukemia?", "options": [{"label": "A", "text": "Tdt", "correct": false}, {"label": "B", "text": "CD1a", "correct": false}, {"label": "C", "text": "CD3", "correct": false}, {"label": "D", "text": "Cytokeratin", "correct": true}], "correct_answer": "D. Cytokeratin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Cytok\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "How would you distinguish between a thymoma and ALL when presented with a mediastinal mass?", "options": [{"label": "A", "text": "CD1a", "correct": false}, {"label": "B", "text": "CD3", "correct": false}, {"label": "C", "text": "S100", "correct": false}, {"label": "D", "text": "Cytokeratin", "correct": true}], "correct_answer": "D. Cytokeratin", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Cytok\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following proto-oncogenes is not implicated in carcinoma of the thyroid??", "options": [{"label": "A", "text": "RAS", "correct": false}, {"label": "B", "text": "RET", "correct": false}, {"label": "C", "text": "BRAF", "correct": false}, {"label": "D", "text": "p53", "correct": true}], "correct_answer": "D. p53", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - p53\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following does not fall under the provisional entity in the WHO 2016 classification of hematolymphoid tumours?", "options": [{"label": "A", "text": "Natural Killer cell lymphoblastic leukemia / lymphoma", "correct": false}, {"label": "B", "text": "B-lymphoblastic leukemia / lymphoma with hypodipioidy", "correct": false}, {"label": "C", "text": "Acute myeloid leukemia with RUNX1 mutation", "correct": false}, {"label": "D", "text": "Splenic B-cell lymphoma / leukemia", "correct": true}], "correct_answer": "D. Splenic B-cell lymphoma / leukemia", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Splenic B-cell <span class=\"customMeta\" data-dictid=\"5a31d184f21692777191a2e457d646\">lymphoma</span> / leuk\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a small round blue cell tumor?", "options": [{"label": "A", "text": "Hemangioblastoma", "correct": true}, {"label": "B", "text": "Ewing’s sarcoma", "correct": false}, {"label": "C", "text": "Retinoblastoma", "correct": false}, {"label": "D", "text": "Neuroblastoma", "correct": false}], "correct_answer": "A. Hemangioblastoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Hemang\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is true about anaplasia?", "options": [{"label": "A", "text": "Loss of cohesion between cells", "correct": false}, {"label": "B", "text": "Loss of differentiation", "correct": true}, {"label": "C", "text": "Change of epithelium type", "correct": false}, {"label": "D", "text": "Benign and fully reversible", "correct": false}], "correct_answer": "B. Loss of differentiation", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - L\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Anaplasia refers to:", "options": [{"label": "A", "text": "Lack of differentiation", "correct": true}, {"label": "B", "text": "Variation in cell size and shape", "correct": false}, {"label": "C", "text": "Replacement of one type of cell by other", "correct": false}, {"label": "D", "text": "Disordered arrangement of tumor cells", "correct": false}], "correct_answer": "A. Lack of differentiation", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Lack\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td><strong>Anaplasia</strong></td>\n<td>Anaplasia is characterized by the loss of normal <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> differentiation</td>\n</tr>\n<tr>\n<td><strong>Metaplasia</strong></td>\n<td>Metaplasia refers to the <span class=\"customMeta\" data-dictid=\"a4488d66fc16927771975d043c4ccc\">reversible</span> change of one <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> cell type to another <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> cell type in response to certain <span class=\"customMeta\" data-dictid=\"7d7e9fdf401692777199f2038941b6\">stimuli</span> or chronic irritation.</td>\n</tr>\n<tr>\n<td><strong>Pleomorphism</strong></td>\n<td>Pleomorphism refers to the presence of cells with different sizes and shapes within a tumor.</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the most common brain tumor seen in children?", "options": [{"label": "A", "text": "Medulloblastoma", "correct": true}, {"label": "B", "text": "Ependymal tumors", "correct": false}, {"label": "C", "text": "Meningioma", "correct": false}, {"label": "D", "text": "Glioma", "correct": false}], "correct_answer": "A. Medulloblastoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct option A: Medu\n<p>Correct option A: Medu\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The mutations / changes that convert proto-oncogene to oncogene include all except :", "options": [{"label": "A", "text": "Promoter insertion", "correct": false}, {"label": "B", "text": "Enhancer deletion", "correct": true}, {"label": "C", "text": "Gene amplification", "correct": false}, {"label": "D", "text": "Point mutation", "correct": false}], "correct_answer": "B. Enhancer deletion", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"e0a50bc4ea1692777187c349ba7bc7\">Enhancer</span&g\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>Mechanism</strong></td>\n<td style=\"text-align:center\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td>Point mutations</td>\n<td>Single <span class=\"customMeta\" data-dictid=\"94a2f0970016927771932885a3d362\">nucleotide</span> changes in the DNA sequence of the <span class=\"customMeta\" data-dictid=\"07aa4138b11692777196389334280a\">proto-oncogene</span> that result in <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> protein function or <span class=\"customMeta\" data-dictid=\"ab1c99888b16927771857bdf876f02\">constitutive</span> <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of <span class=\"customMeta\" data-dictid=\"f9016f36fd1692777198b0fd5e9c6d\">signaling</span> pathways</td>\n</tr>\n<tr>\n<td>Gene amplification</td>\n<td>Increase in the number of copies of a specific <span class=\"customMeta\" data-dictid=\"07aa4138b11692777196389334280a\">proto-oncogene</span> leads to increased <span class=\"customMeta\" data-dictid=\"b5bd69c9791692777186a40f45ffb6\">dosage</span> and overexpression of the gene product</td>\n</tr>\n<tr>\n<td>Chromosomal translocation</td>\n<td>Rearrangement of genetic material that results in the <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> of a <span class=\"customMeta\" data-dictid=\"07aa4138b11692777196389334280a\">proto-oncogene</span> with a different gene, leading to the production of a <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> protein with <span class=\"customMeta\" data-dictid=\"a4b1eb3c9b1692777194c3a119d72f\">oncogenic</span> properties</td>\n</tr>\n<tr>\n<td>Chromosomal inversion</td>\n<td>Rearrangement of genetic material that involves the <span class=\"customMeta\" data-dictid=\"82343f61171692777197b4a08bc719\">reversal</span> of the orientation of a segment of DNA, leading to altered <span class=\"customMeta\" data-dictid=\"e90d7fdd7316927771880df273d8ef\">gene expression</span> or <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> of a <span class=\"customMeta\" data-dictid=\"07aa4138b11692777196389334280a\">proto-oncogene</span> with a different gene</td>\n</tr>\n<tr>\n<td>Promoter insertion</td>\n<td>Insertion of a <span class=\"customMeta\" data-dictid=\"239a5e19771692777196d5b860c695\">promoter</span> sequence near a <span class=\"customMeta\" data-dictid=\"07aa4138b11692777196389334280a\">proto-oncogene</span> leads to increased and unregulated gene expression</td>\n</tr>\n<tr>\n<td>Epigenetic modifications</td>\n<td>Changes in <span class=\"customMeta\" data-dictid=\"6b8b04eb57169277718606138884c5\">DNA methylation</span> or <span class=\"customMeta\" data-dictid=\"2f9fcbc0831692777189f689777d4f\">histone</span> modifications that result in altered gene expression, including the <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of proto-oncogenes</td>\n</tr>\n<tr>\n<td>Viral integration</td>\n<td>Integration of <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> DNA into the host <span class=\"customMeta\" data-dictid=\"38e826cc0616927771883619c4227c\">genome</span> near a proto-oncogene, leading to altered <span class=\"customMeta\" data-dictid=\"e90d7fdd7316927771880df273d8ef\">gene expression</span> or <span class=\"customMeta\" data-dictid=\"ba6b77f29316927771807350f86ce2\">activation</span> of the proto-oncogene</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 49 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 62-year-old hospitalized woman is evaluated for worsening skin lesions. She was admitted 6 days ago for total hip replacement surgery. The surgery was uncomplicated. She is receiving low-dose subcutaneous heparin for prophylaxis of DVT. O/E, there are several large purple/ black patches seen in the periumbilical region surrounded by erythema. Which of the following is true regarding heparin-induced thrombocytopenia (HIT)?", "options": [{"label": "A", "text": "Type 1 is more common than type 2", "correct": true}, {"label": "B", "text": "Type 1 is due to antibodies against PF 4", "correct": false}, {"label": "C", "text": "HIT can lead to elevated fibrinogen levels", "correct": false}, {"label": "D", "text": "Type 2 occurs immediately after the initiation of heparin.", "correct": false}], "correct_answer": "A. Type 1 is more common than type 2", "question_images": ["https://image.prepladder.com/content/M97NyMjNedIuYcoS4kVS1737086441.png"], "explanation_images": ["https://image.prepladder.com/content/ci2UiiTUquh7jYYXshTB1737086518.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:709px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HIT type 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HIT type 2</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Epidemiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>More common <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Less common</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Timeline</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs immediately</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occurs 5 - 14 days after therapy<strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Self-resolving</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Can lead to life-threatening arterial or <span class=\"customMeta\" data-dictid=\"96e7e3fecc16927772018cb9f8c8cd\">venous</span> thrombosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathogenesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>This occurs due to the <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> aggregating effects of heparin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antibodies against PF4 that lead to <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> <span class=\"customMeta\" data-dictid=\"a00e90be0416927771803afbbf099b\">aggregation</span> and thrombosis. <strong>(Option B)</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents with easy bruising and recurrent nosebleeds. Laboratory investigations reveal a prolonged aPTT. A mixing study is performed, and the aPTT corrects after mixing with normal plasma. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Factor deficiency", "correct": true}, {"label": "B", "text": "Platelet dysfunction", "correct": false}, {"label": "C", "text": "Presence of lupus anticoagulant", "correct": false}, {"label": "D", "text": "Vitamin K deficiency", "correct": false}], "correct_answer": "A. Factor deficiency", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/fgUdoPjjNdeIndhyBM3C1747217096.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male is admitted to the ICU following a road traffic accident. Upon arrival, he is hypotensive and tachycardic. Despite fluid resuscitation and transfusion of packed red blood cells, his condition deteriorates rapidly. Lab investigations show a sudden drop in platelet count and prolonged PT and aPTT. DIC is suspected. The thromboelastogram (TEG) graph is shown below: Which of the following is correct?", "options": [{"label": "A", "text": "R time is more in Stage 1", "correct": false}, {"label": "B", "text": "K time is more in stage 2", "correct": true}, {"label": "C", "text": "Maximum amplitude is more in stage 2", "correct": false}, {"label": "D", "text": "Maximum amplitude is less in stage 1", "correct": false}], "correct_answer": "B. K time is more in stage 2", "question_images": ["https://image.prepladder.com/content/cXPLzgbHsvw6g5ZdXzuw1737087790.png"], "explanation_images": ["https://image.prepladder.com/content/brKTYj2tuR9eml2swZcr1737087851.png", "https://image.prepladder.com/content/wsbNwxXe7phzQ9no4ynh1737087920.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:402px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>DIC stage 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>DIC stage 2</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>R time</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Decreased</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>K Time</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>MA</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased</p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Decreased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>LY 30</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60 y/o man is brought to the hospital following a high-speed head-on collision. O/E, BP is 80/50mmhg and HR is 130bpm. Laboratory studies indicate a significant drop in platelet count, prolonged PT, and aPTT. DIC is suspected, and a thromboelastogram is performed. What term represents the time from the initiation of the test until the initial formation of the clot?", "options": [{"label": "A", "text": "R time", "correct": true}, {"label": "B", "text": "K Time", "correct": false}, {"label": "C", "text": "Maximum Amplitude (MA)", "correct": false}, {"label": "D", "text": "LY30", "correct": false}], "correct_answer": "A. R time", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Normal value</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Problem it indicates</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Reaction time</strong><br/>\n<strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Time taken for the <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> to start forming</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>7.5-15 mins</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased: <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">Deficiency</span> in <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> factors</p>\n<p>Decreased: Hypercoagulable states</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fresh frozen plasma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>K time- <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> firmness</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Time for the <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> to reach fixed strength</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3-6 mins</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrinogen dysfunction</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cryoprecipitate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alpha angle</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrin linking speed</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>45° and 55°</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrinogen dysfunction</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cryoprecipitate</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Maximum <span class=\"customMeta\" data-dictid=\"4c75de951316927771819cdfdbdd6a\">amplitude</span> </strong><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The highest vertical <span class=\"customMeta\" data-dictid=\"4c75de951316927771819cdfdbdd6a\">amplitude</span> of TEG</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>50-60 mm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Platelets (most often)</p>\n<p>Clotting factors</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Platelets</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lysis in 30 mins </strong><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Percentage of <span class=\"customMeta\" data-dictid=\"4c75de951316927771819cdfdbdd6a\">amplitude</span> reduction<br/>\n\t\t\t30 minutes after maximum amplitude</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>0-8%</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A high value indicates <span class=\"customMeta\" data-dictid=\"7a1ae24f701692777187a7f60bbd9f\">excess</span> <span class=\"customMeta\" data-dictid=\"803b5ed1c8169277719190b446ac83\">lysis</span> of the clot</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tranexamic acid</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10 y/o boy presents with a history of recurrent nosebleeds and easy bruising since early childhood. O/E, there are multiple petechiae and ecchymoses on his skin. Laboratory investigations reveal normal platelet count but markedly decreased platelet aggregation. Bernard-Soulier Syndrome is suspected. Which of the following features would commonly be observed in platelet aggregometry for this patient?", "options": [{"label": "A", "text": "Normal aggregation with ristocetin", "correct": false}, {"label": "B", "text": "No aggregation with ristocetin", "correct": true}, {"label": "C", "text": "No aggregation with collagen", "correct": false}, {"label": "D", "text": "No aggregation with epinephrine", "correct": false}], "correct_answer": "B. No aggregation with ristocetin", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 6-year-old girl presents with persistent bleeding from minor cuts and bruises since early childhood. On examination, there are multiple bruises and petechiae on her limbs. Lab investigations reveal normal platelet count but markedly decreased platelet aggregation. Glanzmann thrombasthenia is suspected. Which of the following agonists will be able to demonstrate decreased platelet aggregation?", "options": [{"label": "A", "text": "Adenosine diphosphate (ADP)", "correct": false}, {"label": "B", "text": "Collagen", "correct": false}, {"label": "C", "text": "Epinephrine", "correct": false}, {"label": "D", "text": "All of the above", "correct": true}], "correct_answer": "D. All of the above", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old man presents with a history of easy bruising and recurrent nosebleeds. Laboratory investigations reveal normal platelet count but prolonged bleeding time. A Platelet aggregometry test is performed, showing a decrease in light transmission. What is the most likely interpretation of the platelet aggregometry results in this patient?", "options": [{"label": "A", "text": "Platelet aggregation", "correct": false}, {"label": "B", "text": "No platelet aggregation", "correct": true}, {"label": "C", "text": "Increase in serum sodium", "correct": false}, {"label": "D", "text": "Increase in plasma fibrinogen", "correct": false}], "correct_answer": "B. No platelet aggregation", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/nG1AWtINwbPEKONLrgGs1737087370.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 12-year-old male presents with a history of frequent nosebleeds and easy bruising. His parents report that he has had these symptoms for several years, but they seem to be worsening recently. On examination, petechiae are noted on his skin, particularly over his legs, and laboratory investigations reveal prolonged bleeding time, elevated aPTT, and PT within normal range. His platelet count is normal. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Hemolytic Uremic Syndrome (HUS)", "correct": false}, {"label": "B", "text": "Hemophilia", "correct": false}, {"label": "C", "text": "Bernard Soulier syndrome", "correct": false}, {"label": "D", "text": "Von Willebrand Disease (vWD)", "correct": true}], "correct_answer": "D. Von Willebrand Disease (vWD)", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:661px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Platelet count</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>BT</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PT</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>aPTT</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bernard Soulier syndrome<strong> </strong><strong>(Option C)</strong></p>\n<p>Glanzman thrombasthenia</p>\n<p>(Both qualitative)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>HUS/TTP<strong> </strong><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>vWD</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>DIC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hemophilia A <strong>(Option B)</strong></p>\n<p>Hemophilia B</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ITP</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/EF1ZBkmbCUuYosUOboDv1747309017.mp3", "video": ""}, {"text": "A 35-year-old mother underwent a C-section. On post-op day 1, she complains of shortness of breath and bleeding from catheter sites. Her vitals are unstable. Which of the following statements is false concerning her condition?", "options": [{"label": "A", "text": "PT, and APTT are normal.", "correct": true}, {"label": "B", "text": "AMLM3 is associated with DIC", "correct": false}, {"label": "C", "text": "FDP &amp; D-dimer levels are elevated", "correct": false}, {"label": "D", "text": "Meningococcemia is associated with DIC", "correct": false}], "correct_answer": "A. PT, and APTT are normal.", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 4-year-old child is brought to the emergency department with a history of bloody diarrhea followed by pallor, fatigue, and reduced urine output. Laboratory investigations reveal anemia, thrombocytopenia, and elevated serum creatinine. A peripheral blood smear is done and is given below. What is the most likely cause of this child’s diarrhea?", "options": [{"label": "A", "text": "O157:H7", "correct": true}, {"label": "B", "text": "Defect in ADAM-TS 13", "correct": false}, {"label": "C", "text": "Mutation in TGF-beta", "correct": false}, {"label": "D", "text": "Prosthetic valves", "correct": false}], "correct_answer": "A. O157:H7", "question_images": ["https://image.prepladder.com/content/A9cDk1VXxQv4mN49rG8f1737086857.png"], "explanation_images": ["https://image.prepladder.com/notes/mjhUoomsjx9RzKa7OB8x1747217008.png", "https://image.prepladder.com/content/ayf8ALbeSbZOe6m31k2O1737086982.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old boy is brought to the clinic with recurrent episodes of spontaneous bleeding into his joints. Laboratory tests reveal a prolonged activated partial thromboplastin time (aPTT) and reduced factor VIII levels. Based on these findings, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Hemophilia A", "correct": true}, {"label": "B", "text": "Hemophilia B", "correct": false}, {"label": "C", "text": "Hemophilia C", "correct": false}, {"label": "D", "text": "Pseudohemophilia", "correct": false}], "correct_answer": "A. Hemophilia A", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:550px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia A </strong><strong>(Option A</strong>)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia B</strong> <strong>(option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Deficient factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 8 deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 9 deficiency</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathway affected in the cascade</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Intrinsic <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> defect</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>APTT</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>BT, PT, and TT</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cryoprecipitate, <span class=\"customMeta\" data-dictid=\"b566321fe8169277719716b1cf4df0\">Recombinant</span> factor 8 (Humate)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fresh frozen <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> (FFP)</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:491px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 8 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (X-linked recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia B</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 9 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (X-linked recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia C</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 11 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (Autosomal recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parahemophilia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 5 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (Autosomal recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pseudo hemophilia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Also known as Von Willebrand disease</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old woman presents with fatigue, early satiety, and left upper quadrant mass. Lab investigation reveals anemia and thrombocytopenia. Blood smear shows teardrop-shaped RBCs and nucleated RBCs. Bone marrow biopsy confirms myelofibrosis. Which megakaryocyte defect is characteristic in this condition?", "options": [{"label": "A", "text": "Dwarf Megakaryocyte", "correct": false}, {"label": "B", "text": "Staghorn megakaryocyte", "correct": false}, {"label": "C", "text": "Pawn ball megakaryocyte", "correct": false}, {"label": "D", "text": "Cloud-like megakaryocyte", "correct": true}], "correct_answer": "D. Cloud-like megakaryocyte", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/f17YKYQA7z2m1FNQrAHG1737680192.png", "https://image.prepladder.com/content/0tXlJ1v8W9ZFUXaSPkox1737680245.png", "https://image.prepladder.com/content/4T2azoYnkttfo7mg1Kga1737085125.png", "https://image.prepladder.com/content/sXyRJC8ITNRN5pGWLX8j1737085196.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:682px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Megakaryocyte defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Seen in</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dwarf Megakaryocyte/ </strong><strong>Micromegakaryocyte (Option A)</strong></p>\n<p style=\"text-align: center;\"><img alt=\"\" data-author=\"Wulyo Rajabto,Ary Harryanto Reksodiputro,Ikhwan Rinaldi,Hilman Tadjoedin,Dimas Priantono,Yohana Kusuma Angkasa\" data-hash=\"\" data-license=\"CC BY NC ND 4.0\" data-source=\"https://www.researchgate.net/figure/Bone-marrow-morphology-of-patients-with-chronic-phase-CML-showed-dwarf-megakaryocytes_fig3_362403666\" data-tags=\"\" height=\"2738\" src=\"https://image.prepladder.com/content/f17YKYQA7z2m1FNQrAHG1737680192.png\" width=\"4167\"/></p>\n<p> </p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small megakaryocytes with hypolobated nuclei</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">leukemia</span> (CML)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Staghorn <span class=\"customMeta\" data-dictid=\"a9e4aca9db16927771925f99eb40c9\">megakaryocyte</span> (Option B)</strong></p>\n<p style=\"text-align: center;\"><img alt=\"\" data-author=\" Tariq N Aladily,Randa S. Mohammad,Ali Al Khader,Abdullah S Awidi\" data-hash=\"\" data-license=\"CC BY-NC 4.0\" data-source=\"https://www.researchgate.net/figure/A-megakaryocyte-with-stag-horn-nucleus-is-characteristic-of-essential-thrombocythemia_fig4_317262416\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/0tXlJ1v8W9ZFUXaSPkox1737680245.png\" width=\"4130\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large in size with hyperlobated staghorn-shaped nuclei, and abundant cytoplasm</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Essential thrombocytopenia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pawn ball megakaryocyte</strong> <strong>(Option C)</strong></p>\n<p><img alt=\"\" data-author=\"Baitule Amey Madhav\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.semanticscholar.org/paper/A-Morphological-Study-of-Acute-Myeloid-Leukemia-and-Madhav/b03c6fbf45e61721148c97f920a4d681e960a0e5/figure/33\" data-tags=\"\" height=\"446\" src=\"https://image.prepladder.com/content/4T2azoYnkttfo7mg1Kga1737085125.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Megakaryocytes with multiple dispersed nuclei</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myelodysplastic syndrome (MDS)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cloud-like <span class=\"customMeta\" data-dictid=\"a9e4aca9db16927771925f99eb40c9\">megakaryocyte</span> (Option D)</strong></p>\n<p><img alt=\"\" data-author=\"Linda N Dao, Curtis A Hanson , Angela Dispenzieri , William G Morice , Paul J Kurtin , James D Hoyer\" data-hash=\"\" data-license=\"© 2011 by The American Society of Hematology\" data-source=\"https://www.semanticscholar.org/paper/A-Morphological-Study-of-Acute-Myeloid-Leukemia-and-Madhav/b03c6fbf45e61721148c97f920a4d681e960a0e5/figure/33\" data-tags=\"\" height=\"396\" src=\"https://image.prepladder.com/content/sXyRJC8ITNRN5pGWLX8j1737085196.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal-sized megakaryocytes with small <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and hyperchromatic, hypolobated cloud-like nuclei</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myelofibrosis</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:494px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Megakaryocyte defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Seen in</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dwarf Megakaryocyte</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"da88d7f2211692777193037caba514\">myeloid</span> <span class=\"customMeta\" data-dictid=\"4521dbf4b91692777191a73002bf98\">leukemia</span> (CML)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Staghorn <span class=\"customMeta\" data-dictid=\"a9e4aca9db16927771925f99eb40c9\">megakaryocyte</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Essential thrombocytopenia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pawn ball <span class=\"customMeta\" data-dictid=\"a9e4aca9db16927771925f99eb40c9\">megakaryocyte</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myelodysplastic syndrome (MDS)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cloud-like megakaryocyte</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Myelofibrosis</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the defect with the corresponding syndrome: Defect Syndrome 1. Gp1b/9 a. Hermanski pudlak syndrome 2. Alpha granules b. Bernard Soulier syndrome 3. Delta granules c. Glanzmann thrombasthenia 4. Gp2b/3a d. Gray platelet syndrome", "options": [{"label": "A", "text": "1-c, 2-a, 3-b, 4-b", "correct": false}, {"label": "B", "text": "1-d, 2-c, 3-a, 4-b", "correct": false}, {"label": "C", "text": "1-b, 2-a, 3-d, 4-c", "correct": false}, {"label": "D", "text": "1-b, 2-d, 3-a, 4-c", "correct": true}], "correct_answer": "D. 1-b, 2-d, 3-a, 4-c", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:601px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Syndrome</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gp1b/9</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Bernard Soulier syndrome (shows big-sized platelets)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Von Willebrand factor</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Von Willebrand disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Alpha granules</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gray <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> syndrome (aged platelets)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Delta granules</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hermansky-Pudlak syndrome</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gp2b/3a</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glanzmann thrombasthenia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrinogen</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Afibrinogenemia</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/kRHfWAx7msDOtcCEiP4N1745348066.mp3", "video": ""}, {"text": "A 34-year-old man comes to the physician complaining of occasional dizziness and palpitations in crowded spaces. He is an executive who travels frequently and reports high-stress levels at work. Labs: Hb= 14.0 Platelets = 80,000 Leukocytes = 7,200 RBCs= 5 million Peripheral smear shows a reduced platelet count without clumping or malignant cells. Which of the following is the most appropriate next test for this patient?", "options": [{"label": "A", "text": "EBV virus titers", "correct": false}, {"label": "B", "text": "Rapid plasma reagin test", "correct": false}, {"label": "C", "text": "Schilling test", "correct": false}, {"label": "D", "text": "HIV antibody test", "correct": true}], "correct_answer": "D. HIV antibody test", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acute ITP</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chronic ITP</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Child</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adult (<40 yrs)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Common in</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>M=F</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Females</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Etiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Often follows <span class=\"customMeta\" data-dictid=\"5cc2d9fac616927772021889ee6d52\">viral</span> infections</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Can be primary (idiopathic) or secondary to SLE, HIV, CLL</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Laboratory Findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Isolated <span class=\"customMeta\" data-dictid=\"fc28c74bb716927772003aee4aa43c\">thrombocytopenia</span> (<20,000/μL),<br/>\n\t\t\tnormal PT and aPTT, ↑BT</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Isolated <span class=\"customMeta\" data-dictid=\"fc28c74bb716927772003aee4aa43c\">thrombocytopenia</span> (30,000-80,000/μL), normal PT and aPTT, ↑BT;</p>\n<p>Hypercellular <span class=\"customMeta\" data-dictid=\"c8a8c935a41692777191610f6aacb4\">marrow</span> with megakaryocytic hyperplasia; Megathrombocytes in <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">peripheral</span> blood</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Resolution </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal within 6 months</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>> 6 months</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Often self-limited</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Steroids.<br/>\n\t\t\tSplenectomy in <span class=\"customMeta\" data-dictid=\"3790c638ab16927771970a0a41d3ab\">refractory</span> cases.</p>\n</td>\n</tr>\n</tbody>\n\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 14-year-old adolescent presents with recurrent episodes of unexplained swelling and pain following minor injuries or physical activity. Upon examination, there are signs of localized swelling and tenderness. Lab investigations reveal normal platelet counts and bleeding time, but clotting times are prolonged. Which symptom would strongly suggest a coagulation defect in this patient?", "options": [{"label": "A", "text": "Petechiae", "correct": false}, {"label": "B", "text": "Purpura", "correct": false}, {"label": "C", "text": "Ecchymosis", "correct": false}, {"label": "D", "text": "Hemarthrosis", "correct": true}], "correct_answer": "D. Hemarthrosis", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:699px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical manifestation </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Platelet disorders </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Coagulation disorders </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bleeding site </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mucous membranes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Muscles and joints</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Presentation </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Superficial bleeds like <span class=\"customMeta\" data-dictid=\"e789c11517169277719570ebf816eb\">Petechia</span> , purpura, mucosal bleeds; multiple sites</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Deep tissue bleeds like <span class=\"customMeta\" data-dictid=\"832849414c1692777188491f77bb5f\">Hematoma</span> , <span class=\"customMeta\" data-dictid=\"cd42e0ddad1692777190d18c595ec5\">intracranial</span> bleeds (most dangerous ) , joint bleeds/ hemarthroses (most common); localized</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bleeding onset </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prolonged <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> from cuts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>May be delayed at onset</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Family history </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rare</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Common</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment response </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediately</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Insidious</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 22-year-old woman presents to the clinic with a history of frequent nosebleeds and heavy menstrual periods. She reports prolonged bleeding after minor cuts and has noticed easy bruising. On physical examination, multiple small bruises are on her arms and legs. Which of the following tests is most likely to be abnormal?", "options": [{"label": "A", "text": "Bleeding Time (BT)", "correct": true}, {"label": "B", "text": "Clotting Time (CT)", "correct": false}, {"label": "C", "text": "Prothrombin Time (PT)", "correct": false}, {"label": "D", "text": "Activated Partial Thromboplastin Time (aPTT)", "correct": false}], "correct_answer": "A. Bleeding Time (BT)", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:699px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical manifestation </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Platelet disorders </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Coagulation disorders </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bleeding site </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mucous membranes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Muscles and joints</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Presentation </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Petechia , multiple sites</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hematoma , localized</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bleeding onset </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prolonged <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> from cuts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>May be delayed at onset</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Family history </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rare</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Common</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment response </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Immediately</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Insidious</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 2-week-old male infant is brought to the pediatrician by his parents because of prolonged bleeding from the umbilical stump. The parents report that the bleeding started soon after the umbilical cord fell off and has not stopped despite applying pressure. Laboratory tests show normal Prothrombin Time (PT), Activated Partial Thromboplastin Time (aPTT), and platelet count. Which of the following deficiencies is most likely causing the prolonged bleeding?", "options": [{"label": "A", "text": "Factor VIII", "correct": false}, {"label": "B", "text": "Factor XIII", "correct": true}, {"label": "C", "text": "Factor IV", "correct": false}, {"label": "D", "text": "Factor IX", "correct": false}], "correct_answer": "B. Factor XIII", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/rgOG0dKuOZYsN59WvaOc1737085949.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old woman presents with excessive bleeding following a tooth extraction. She reports a history of recurrent nosebleeds and easy bruising since childhood. Lab tests show prolonged activated partial thromboplastin time (aPTT) and normal prothrombin time (PT). Further testing reveals decreased levels of a clotting factor’s activity. Which of the following is not an intrinsic factor?", "options": [{"label": "A", "text": "Factor XII", "correct": false}, {"label": "B", "text": "Factor VII", "correct": true}, {"label": "C", "text": "Factor XI", "correct": false}, {"label": "D", "text": "Factor IX", "correct": false}], "correct_answer": "B. Factor VII", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/drHRaVIr7pVhp84ILXo51747216893.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:698px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extrinsic factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intrinsic factors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Common <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> factors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3 (tissue factor), 7</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>12, 11, 9, 8</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>10, 5, 2, 1, 13</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male patient presents with a history of recurrent episodes of uncontrolled bleeding from minor injuries and easy bruising. Lab investigations reveal prolonged prothrombin time (PT) and activated partial thromboplastin time (aPTT). Considering a potential vitamin K deficiency, which specific clotting factors should be evaluated to confirm the diagnosis in this patient?", "options": [{"label": "A", "text": "Tissue thromboplastinLabile factor", "correct": false}, {"label": "B", "text": "Labile factor", "correct": false}, {"label": "C", "text": "Hageman factor", "correct": false}, {"label": "D", "text": "Stable factor", "correct": true}], "correct_answer": "D. Stable factor", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:456px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Factors </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Names </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>I</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrinogen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>II</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prothrombin</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>III</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tissue thromboplastin</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IV</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ca2+</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>V</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Labile factor</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>VII</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stable factor</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>VIII</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Antihemophilic factor A</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IX</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Christmas factor (Antihemophilic factor B)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>X</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Stuart-Prower factor</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>XI</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Plasma <span class=\"customMeta\" data-dictid=\"9b51982d06169277720063c9420fbb\">thromboplastin</span> <span class=\"customMeta\" data-dictid=\"401e45366416927771815b9706c778\">antecedent</span> (PTA)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>XII</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hageman factor</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>XIII</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrin stabilizing factor</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old woman presents with easy bruising, heavy menstrual bleeding, and prolonged bleeding after cuts and dental extraction. Lab tests show normal platelet counts but impaired platelet function. Which of the following substances, primarily released from alpha granules, might be deficient in this patient's platelets?", "options": [{"label": "A", "text": "Serotonin", "correct": false}, {"label": "B", "text": "Epinephrine", "correct": false}, {"label": "C", "text": "ADP", "correct": false}, {"label": "D", "text": "P-selectin", "correct": true}], "correct_answer": "D. P-selectin", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:666px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alpha granules</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Delta/Dense granules</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>P- <span class=\"customMeta\" data-dictid=\"3a7b33ddd81692777198e6f6980474\">selectin</span> (Option D)</li>\n<li>PF4 (platelet factor 4)</li>\n<li>PDGF (platelet-derived growth factor)</li>\n<li>Factor V, VIII</li>\n<li>Fibrinogen</li>\n</ul>\n<p>(Mnemonic: all P things and all Factors)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>ADP<strong> </strong><strong>(Option C)</strong></li>\n<li>ATP</li>\n<li>Serotonin <strong>(Option A)</strong></li>\n<li>Serum calcium</li>\n<li>Epinephrine <strong>(Option B)</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 22 y/o woman arrives at the clinic complaining of heavy menstrual flow and recurrent nosebleeds. Upon physical inspection, her arms and legs have several minor bruises. Coagulation studies show high BT, APTT, and normal PT. She is diagnosed with von Willibrand disease. Which type of vWD shows a decrease in binding between VWF and Gp 1b/9?", "options": [{"label": "A", "text": "Type 1", "correct": false}, {"label": "B", "text": "Type 2a", "correct": true}, {"label": "C", "text": "Type 2b", "correct": false}, {"label": "D", "text": "Type 3", "correct": false}], "correct_answer": "B. Type 2a", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>vWD <span class=\"customMeta\" data-dictid=\"ebcb7136251692777201ef4b5c5718\">type 1</span> <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>vWD Type 2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>vWD <span class=\"customMeta\" data-dictid=\"6f809a27121692777201d1ccde5ace\">Type 3</span> <strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Autosomal dominant.</li>\n<li>The most common type.</li>\n<li>Mild to moderate <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> deficiency.</li>\n<li>Quantitative defect.</li>\n<li>point substitutions prevent the <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> protein from maturing or cause it to leave the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> quickly</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Autosomal dominant.</li>\n<li>Qualitative defect.</li>\n</ul>\n<p><br/>\n<strong>Types: </strong>2A, 2B, 2M, 2N</p>\n<ul>\n<li>2A (Most common) - Decrease in binding between <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> and Gp1b/9 (Option B) <span class=\"customMeta\" data-dictid=\"7f17ae677a16927771925cfc2b7972\">missense</span> mutations cause faulty <span class=\"customMeta\" data-dictid=\"fdce63b86616927771934a6fba441a\">multimer</span> formation → the most active forms of vWF, i.e. large- and intermediate-sized multimers are absent.</li>\n<li>2B - Increase in binding between <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> and Gp1b/9 (Option C)</li>\n<li>2M - <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">VWF</span> dependant <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> is decreased. There is <span class=\"customMeta\" data-dictid=\"4885d5d0021692777189aac6dc80f7\">impairment</span> of <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">VWF</span> binding to platelets. Type 2M VWD typically has mild to moderate <span class=\"customMeta\" data-dictid=\"da3e60ac9a16927771933cdfe4327f\">mucocutaneous</span> bleeding</li>\n<li>2N - There is marked decline in the binding <span class=\"customMeta\" data-dictid=\"227269f3ec1692777180d76a7898dd\">affinity</span> for factor VIII. The level of <span class=\"customMeta\" data-dictid=\"65dc2273b5169277720208ba704b7f\">factor VIII</span> is lower when compared to the VWF:Ag. This led to misdiagnosis as haemophilia A</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Autosomal recessive</strong>.</li>\n<li>Quantitative defect.</li>\n<li>produced by frameshift mutations or deletions affecting both alleles (autosomal recessive), which produce little or no vWF.</li>\n<li>Factor VIII levels are also lowered because <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> stabilizes <span class=\"customMeta\" data-dictid=\"65dc2273b5169277720208ba704b7f\">factor VIII</span> in the blood, and the resulting <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> condition is severe.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old woman is diagnosed with von Willebrand Disease (vWD) after presenting with frequent nosebleeds and prolonged bleeding after minor cuts. Laboratory tests reveal a defect in the von Willebrand factor (vWF). Which of the following is also involved in the pathogenesis of this condition?", "options": [{"label": "A", "text": "gp1b-IX", "correct": true}, {"label": "B", "text": "gpIIb-IIIa", "correct": false}, {"label": "C", "text": "Factor IX", "correct": false}, {"label": "D", "text": "Factor XIII", "correct": false}], "correct_answer": "A. gp1b-IX", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/rvl0WInrRgiCtDow8RVD1737085385.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 32 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 26-year-old female with a bleeding disorder following autosomal dominant inheritance. She gave the history of her father and sister having the same bleeding disorders. What is the most likely disorder?", "options": [{"label": "A", "text": "Von Willebrand disease", "correct": true}, {"label": "B", "text": "Hemophilia A", "correct": false}, {"label": "C", "text": "Christmas disease", "correct": false}, {"label": "D", "text": "Factor X deficiency", "correct": false}], "correct_answer": "A. Von Willebrand disease", "question_images": [], "explanation_images": [], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>vWD type 1</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>vWD Type 2</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>vWD <span class=\"customMeta\" data-dictid=\"6f809a27121692777201d1ccde5ace\">Type 3</span> </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Autosomal dominant.</li>\n<li>The most common type.</li>\n<li><strong>Mild to moderate </strong>vWF deficiency.</li>\n<li>Quantitative defect.</li>\n<li>Point substitutions prevent the <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> protein from maturing or cause it to leave the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> quickly.</li>\n</ul>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Autosomal dominant.</li>\n<li><strong>Qualitative defect.</strong></li>\n</ul>\n<p><br/>\n<strong>Types: </strong>2A, 2B, 2M, 2N</p>\n<ul>\n<li>2A (<strong>Most common</strong>) - Decrease in binding between <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> and Gp1b/9 <span class=\"customMeta\" data-dictid=\"7f17ae677a16927771925cfc2b7972\">Missense</span> mutations cause faulty <span class=\"customMeta\" data-dictid=\"fdce63b86616927771934a6fba441a\">multimer</span> formation → the most active forms of vWF, i.e. large- and intermediate-sized multimers are absent.</li>\n<li>2B - Increase in binding between <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> and Gp1b/9</li>\n<li>2M - VWF-dependent <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> <span class=\"customMeta\" data-dictid=\"2b1931a185169277718065e3fa42dd\">adhesion</span> is decreased. <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">VWF</span> binding to platelets is impaired. Type 2M VWD typically has mild to moderate <span class=\"customMeta\" data-dictid=\"da3e60ac9a16927771933cdfe4327f\">mucocutaneous</span> bleeding</li>\n<li>2N - There is a marked decline in the binding <span class=\"customMeta\" data-dictid=\"227269f3ec1692777180d76a7898dd\">affinity</span> for factor VIII. The level of <span class=\"customMeta\" data-dictid=\"65dc2273b5169277720208ba704b7f\">factor VIII</span> is lower when compared to the VWF: Ag. This led to misdiagnosis as haemophilia A.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Autosomal recessive</strong>.</li>\n<li>Quantitative defect.</li>\n<li>Produced by <strong>frameshift mutations or deletions </strong>affecting both alleles (autosomal recessive), which produce <strong>little or no vWF. </strong></li>\n<li>Factor VIII levels are also lowered because <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">vWF</span> stabilizes <span class=\"customMeta\" data-dictid=\"65dc2273b5169277720208ba704b7f\">factor VIII</span> in the blood, and the resulting <strong>bleeding condition is severe.</strong></li>\n</ul>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not a haemostatic agent?", "options": [{"label": "A", "text": "Zeolite", "correct": false}, {"label": "B", "text": "Chitosan", "correct": false}, {"label": "C", "text": "Boric acid", "correct": true}, {"label": "D", "text": "Kaolin", "correct": false}], "correct_answer": "C. Boric acid", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C.\n<table>\n<thead>\n<tr>\n<td>\n<p><strong>Active Ingredient</strong></p>\n</td>\n<td>\n<p><strong>Mechanism of Action</strong></p>\n</td>\n<td>\n<p><strong>Advantages</strong></p>\n</td>\n<td>\n<p><strong>Disadvantages</strong></p>\n</td>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n<p>Kaolin</p>\n</td>\n<td>\n<p>Initiates <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> <span class=\"customMeta\" data-dictid=\"6826aa04ef16927771833336e53730\">cascade</span> by activating factor XII</p>\n</td>\n<td>\n<p>Effective in promoting rapid <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> formation, does not rely on the body's <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> factors</p>\n</td>\n<td>\n<p>Can be messy and difficult to remove, potential for allergic reactions</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Chitosan</p>\n</td>\n<td>\n<p>Forms a gel-like <span class=\"customMeta\" data-dictid=\"14958c535b1692777192abd2a85abf\">matrix</span> that enhances <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> formation and <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> aggregation</p>\n</td>\n<td>\n<p>Effective in controlling moderate to severe bleeding, adheres well to wet surfaces</p>\n</td>\n<td>\n<p>May cause local tissue <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> or foreign body reactions</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Zeolite</p>\n</td>\n<td>\n<p>Acts as a molecular sieve, concentrating <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> factors and promoting <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> formation</p>\n</td>\n<td>\n<p>Rapid hemostasis, can be used in various wound types</p>\n</td>\n<td>\n<p>May cause local tissue <span class=\"customMeta\" data-dictid=\"3a74ed0fcf16927771901a79847565\">irritation</span> or discomfort</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Oxidized Regenerated <span class=\"customMeta\" data-dictid=\"6f3ca6553416927771843c886c856b\">Cellulose</span> (ORC)</p>\n</td>\n<td>\n<p>Promotes <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> formation by activating the <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> cascade</p>\n</td>\n<td>\n<p>Provides <span class=\"customMeta\" data-dictid=\"8fb8df140b1692777191702bbc9358\">localized</span> hemostasis, can be left in place without removal</p>\n</td>\n<td>\n<p>May cause foreign body reactions or delayed wound healing</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Fibrin Sealants</p>\n</td>\n<td>\n<p>Combines <span class=\"customMeta\" data-dictid=\"a137b7092a16927772025412d4ef05\">fibrinogen</span> and <span class=\"customMeta\" data-dictid=\"ac7e1f394f1692777200c5bb11e4d8\">thrombin</span> to <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> a <span class=\"customMeta\" data-dictid=\"18c2380be716927772020c9b2863de\">fibrin</span> <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> at the site of bleeding</p>\n</td>\n<td>\n<p>Provides strong and rapid hemostasis, promotes wound healing</p>\n</td>\n<td>\n<p>Expensive, requires appropriate mixing and preparation</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Hemostatic sponges/gauzes impregnated with <span class=\"customMeta\" data-dictid=\"ac7e1f394f1692777200c5bb11e4d8\">thrombin</span> or fibrinogen</p>\n</td>\n<td>\n<p>Enhances <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> formation and accelerates hemostasis</p>\n</td>\n<td>\n<p>Easy to use, effective in controlling bleeding</p>\n</td>\n<td>\n<p>Potential risk of allergic reactions or infection</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the term used to describe the type of cell in the body that has the ability to give rise to the highest number of other cells?", "options": [{"label": "A", "text": "Totipotent", "correct": true}, {"label": "B", "text": "Multipotent", "correct": false}, {"label": "C", "text": "Pluripotent", "correct": false}, {"label": "D", "text": "Lineage stem cells", "correct": false}], "correct_answer": "A. Totipotent", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Stellate granuloma is found in:", "options": [{"label": "A", "text": "Cat scratch disease", "correct": true}, {"label": "B", "text": "Leprosy", "correct": false}, {"label": "C", "text": "Coccidomycosis", "correct": false}, {"label": "D", "text": "Histoplasmosis", "correct": false}], "correct_answer": "A. Cat scratch disease", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Leiden mutation is of factor:", "options": [{"label": "A", "text": "V", "correct": true}, {"label": "B", "text": "VIII", "correct": false}, {"label": "C", "text": "I", "correct": false}, {"label": "D", "text": "X", "correct": false}], "correct_answer": "A. V", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A: V\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>Condition</strong></p>\n</td>\n<td>\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Factor V Leiden mutation</strong></p>\n</td>\n<td>\n<p>Genetic <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> in <span class=\"customMeta\" data-dictid=\"14693f062c16927772024df5839c43\">factor V</span> that increases risk of <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> blood clotting</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Prothrombin gene mutation</strong></p>\n</td>\n<td>\n<p>Genetic <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> in the <span class=\"customMeta\" data-dictid=\"94b02f097916927771962072dbeeac\">prothrombin</span> gene leading to increased <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> activity</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Antithrombin deficiency</strong></p>\n</td>\n<td>\n<p>Deficiency in antithrombin, a protein that inhibits blood clotting</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Protein C deficiency</strong></p>\n</td>\n<td>\n<p>Deficiency in protein C, a natural anticoagulant</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Protein S deficiency</strong></p>\n</td>\n<td>\n<p>Deficiency in protein S, which acts as a <span class=\"customMeta\" data-dictid=\"a416d7580c1692777184952da793d1\">cofactor</span> for protein C</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Elevated <span class=\"customMeta\" data-dictid=\"65dc2273b5169277720208ba704b7f\">factor VIII</span> levels</strong></p>\n</td>\n<td>\n<p>Increased levels of factor VIII, a <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> protein</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>Condition</strong></p>\n</td>\n<td>\n<p><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Pregnancy</strong></p>\n</td>\n<td>\n<p>Increased risk of <span class=\"customMeta\" data-dictid=\"40d68b98721692777183c42090e023\">blood clot</span> formation during pregnancy</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Oral <span class=\"customMeta\" data-dictid=\"a13cdc2a8a1692777185da87f2ff85\">contraceptive</span> use</strong></p>\n</td>\n<td>\n<p>Use of hormonal contraceptives can increase the risk of blood clots</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Estrogen therapy</strong></p>\n</td>\n<td>\n<p>Administration of estrogen-containing medications</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Obesity</strong></p>\n</td>\n<td>\n<p>Obesity is associated with an increased risk of blood clots</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Immobility</strong></p>\n</td>\n<td>\n<p>Prolonged periods of <span class=\"customMeta\" data-dictid=\"d9d99d2177169277718940abaf77fb\">immobility</span> can lead to <span class=\"customMeta\" data-dictid=\"40d68b98721692777183c42090e023\">blood clot</span> formation</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Surgery</strong></p>\n</td>\n<td>\n<p>Surgical procedures can trigger a hypercoagulable state</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Cancer</strong></p>\n</td>\n<td>\n<p>Certain cancers and cancer treatments increase the risk of blood clots</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Antiphospholipid syndrome</strong></p>\n</td>\n<td>\n<p>Autoimmune disorder that causes <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> clotting</p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>Nephrotic syndrome</strong></p>\n</td>\n<td>\n<p>Kidney disorder characterized by protein loss in urine</p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following clotting factor deficiencies will not affect clotting in vivo?", "options": [{"label": "A", "text": "Factor VII", "correct": false}, {"label": "B", "text": "Factor V", "correct": false}, {"label": "C", "text": "Factor XII", "correct": true}, {"label": "D", "text": "Factor IX", "correct": false}], "correct_answer": "C. Factor XII", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/cTS2uo5SokK2z4TMsXRd1746554570.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Below is an image of the coagulation cascade activation following closed endothelial injury. Identify the factor ‘L’, which combines with tissue factor to activate factor IX.", "options": [{"label": "A", "text": "Factor XII", "correct": false}, {"label": "B", "text": "Factor VII", "correct": true}, {"label": "C", "text": "Factor VIII", "correct": false}, {"label": "D", "text": "vWF", "correct": false}], "correct_answer": "B. Factor VII", "question_images": ["https://image.prepladder.com/notes/iUlkKW6nrD19GuyU00n31747051847.png"], "explanation_images": ["https://image.prepladder.com/notes/Ff7mPUgw9ZkDxA6DlHd51747051948.png", "https://image.prepladder.com/notes/FsqXqWST1qfmM0WxA7cx1747051972.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Leiden mutation is of factor:", "options": [{"label": "A", "text": "V", "correct": true}, {"label": "B", "text": "VIII", "correct": false}, {"label": "C", "text": "I", "correct": false}, {"label": "D", "text": "X", "correct": false}], "correct_answer": "A. V", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Stellate granuloma is found in:", "options": [{"label": "A", "text": "Cat scratch disease", "correct": true}, {"label": "B", "text": "Leprosy", "correct": false}, {"label": "C", "text": "Coccidomycosis", "correct": false}, {"label": "D", "text": "Histoplasmosis", "correct": false}], "correct_answer": "A. Cat scratch disease", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:576px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Infectious causes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Non-infectious causes</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>TB (Caseating and non-caseating granuloma)</li>\n<li>Leprosy</li>\n<li>Syphilis</li>\n<li>Malaria (Durck granuloma)</li>\n<li>Cat-scratch disease and <span class=\"customMeta\" data-dictid=\"1df59c006c1692777191996da1b3f0\">Lymphogranuloma</span> venerum (Stellate granuloma)</li>\n<li>Q fever (Doughnut granuloma/ <span class=\"customMeta\" data-dictid=\"18c2380be716927772020c9b2863de\">Fibrin</span> ring granuloma)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Sarcoidosis (Naked granuloma)</li>\n<li>Giant cell arteritis</li>\n<li>Crohn’s disease</li>\n<li>Churg-Strauss syndrome (Eosinophilic granuloma)</li>\n<li>Berylliosis (Foreign body granuloma)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following shows maximum amplitude on thromboelastography?", "options": [{"label": "A", "text": "Platelets", "correct": true}, {"label": "B", "text": "Intrinsic", "correct": false}, {"label": "C", "text": "Extrinsic", "correct": false}, {"label": "D", "text": "von Willebrand Disease (vWD)", "correct": false}], "correct_answer": "A. Platelets", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/LBLlBfjmGoCbHxekE2K31745400506.png", "https://image.prepladder.com/notes/d8jv6tu599VE1NBORZKm1745400583.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A young patient presents with a large retroperitoneal haemorrhage and a history of intermittent knee swelling during strenuous exercise. There is no history of mucosal bleeding. Which of the following deficiencies is responsible for the condition mentioned above?", "options": [{"label": "A", "text": "Factors VIII and IX", "correct": true}, {"label": "B", "text": "GP1b/IX", "correct": false}, {"label": "C", "text": "Von Willebrand factor", "correct": false}, {"label": "D", "text": "Lupus anticoagulant", "correct": false}], "correct_answer": "A. Factors VIII and IX", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Hemophilia A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Hemophilia B</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Deficient factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Factor 8 deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Factor 9 deficiency</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathway affected</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Intrinsic <span class=\"customMeta\" data-dictid=\"3aa5abc2fa169277719488e088076d\">pathway</span> defect</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>APTT</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Elevated</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>BT, PT, and TT</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Normal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Cryoprecipitate, <span class=\"customMeta\" data-dictid=\"b566321fe8169277719716b1cf4df0\">Recombinant</span> factor 8 (Humate)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\">Fresh frozen plasma</p>\n<p style=\"text-align: center;\">(FFP)</p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia A</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 8 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (X-linked recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia B</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 9 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (X-linked recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hemophilia C</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 11 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (Autosomal recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parahemophilia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Factor 5 <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> (Autosomal recessive)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pseudo hemophilia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Also known as Von Willebrand disease</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements about Von Willebrand's disease is incorrect?", "options": [{"label": "A", "text": "Type 2 von Willebrand disease is associated with a moderate bleeding tendency.", "correct": false}, {"label": "B", "text": "Type 3 von Willebrand disease is associated with a complete absence of von Willebrand factor.", "correct": false}, {"label": "C", "text": "Type 1 von Willebrand disease presents with severe bleeding since childhood.", "correct": true}, {"label": "D", "text": "Type 2 von Willebrand disease includes subtypes with varying defects in the von Willebrand factor.", "correct": false}], "correct_answer": "C. Type 1 von Willebrand disease presents with severe bleeding since childhood.", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"ebcb7136251692777201ef4b5c5718\">Type 1</span> von Willebrand disease presents with severe <span class=\"customMeta\" data-dictid=\"41e858bf2816927771836d46c619b9\">bleeding</span> since childh\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center\"><strong>VWD Type 1</strong></td>\n<td style=\"text-align:center\"><strong>VWD Type 2</strong></td>\n<td style=\"text-align:center\"><strong>VWD Type 3</strong></td>\n</tr>\n<tr>\n<td>\n<ul>\n<li>Most common </li>\n<li>Mild <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> in VWF </li>\n<li>Quantitative defect </li>\n<li>Autosomal dominant </li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Autosomal dominant </li>\n<li>Qualitative defect </li>\n</ul>\n<p>Types</p>\n<ul>\n<li>2a - Decrease in binding between <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">VWF</span> and Gp1b/9.</li>\n<li>2b - Increase in binding between <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">VWF</span> and GP1b/9.</li>\n<li>2M</li>\n<li>2N</li>\n</ul>\n</td>\n<td>\n<ul>\n<li>Most severe</li>\n<li>Zero VWF</li>\n<li>Autosomal recessive </li>\n<li>Quantitative defect </li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the color of the vacutainer that contains sodium fluoride?", "options": [{"label": "A", "text": "Red", "correct": false}, {"label": "B", "text": "Grey", "correct": true}, {"label": "C", "text": "Blue", "correct": false}, {"label": "D", "text": "Yellow", "correct": false}], "correct_answer": "B. Grey", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/NVpFAMfxPrRMjJ7hogsX1712745068.png", "https://image.prepladder.com/content/GIW4CmnMUh0LfeQNJg0a1712745068.png", "https://image.prepladder.com/content/M4rjoJyjggOWhbp0YtY11712745068.png", "https://image.prepladder.com/content/R70sSo9eLpwQ4jA5ptMq1712745068.png", "https://image.prepladder.com/content/hEpxct1YYko0vuUZZFr81712745068.png"], "explanation": "<p>Correct Option B - G\n<table cellspacing=\"0\">\n<tbody>\n<tr>\n<td>\n<p><strong>Tube Cap Color </strong></p>\n</td>\n<td>\n<p><strong>Additive </strong></p>\n</td>\n<td>\n<p><strong>Additive Function </strong></p>\n</td>\n<td>\n<p><strong>Common Laboratory Test </strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Light-blue</p>\n<p><img src=\"https://image.prepladder.com/content/NVpFAMfxPrRMjJ7hogsX1712745068.png\"/></p>\n</td>\n<td>\n<p>3.2% sodium citrate</p>\n</td>\n<td>\n<p>Prevents blood from <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> by binding calcium</p>\n</td>\n<td>\n<p>Coagulation</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Red or gold (mottled or “tiger” top)</p>\n<p><img src=\"https://image.prepladder.com/content/GIW4CmnMUh0LfeQNJg0a1712745068.png\"/></p>\n</td>\n<td>\n<p>Serum tube with or without <span class=\"customMeta\" data-dictid=\"5e0b40993316927771844dbf382689\">clot</span> <span class=\"customMeta\" data-dictid=\"a095f733351692777180a29940c98a\">activator</span> or gel</p>\n</td>\n<td>\n<p>Clot <span class=\"customMeta\" data-dictid=\"a095f733351692777180a29940c98a\">activator</span> promotes blood <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> with glass or <span class=\"customMeta\" data-dictid=\"4fc6d603f016927771985e818db6f2\">silica</span> particles <span class=\"customMeta\" data-dictid=\"b0bdc3a1d416927771884d50c944ec\">gel</span> separates <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> from cells</p>\n</td>\n<td>\n<p>Chemistry, serology, immunology</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Green</p>\n<p><img src=\"https://image.prepladder.com/content/M4rjoJyjggOWhbp0YtY11712745068.png\"/></p>\n</td>\n<td>\n<p>Sodium or <span class=\"customMeta\" data-dictid=\"42659effea16927771919c6224e529\">lithium</span> <span class=\"customMeta\" data-dictid=\"050e27829716927771885eddb2620c\">heparin</span> with or without gel</p>\n</td>\n<td>\n<p>Prevents <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> by inhibiting <span class=\"customMeta\" data-dictid=\"ac7e1f394f1692777200c5bb11e4d8\">thrombin</span> and thrombosplastin</p>\n</td>\n<td>\n<p>Stat and routine chemistry</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Lavender or pink</p>\n<p><img src=\"https://image.prepladder.com/content/R70sSo9eLpwQ4jA5ptMq1712745068.png\"/></p>\n</td>\n<td>\n<p>Potassium EDTA</p>\n</td>\n<td>\n<p>Prevents <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> by binding calcium</p>\n</td>\n<td>\n<p>Hematology and blood bank</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Gray</p>\n<p><img src=\"https://image.prepladder.com/content/hEpxct1YYko0vuUZZFr81712745068.png\"/></p>\n</td>\n<td>\n<p>Sodium fluoride, and sodium or <span class=\"customMeta\" data-dictid=\"a995a613a016927771969d4395dc80\">potassium</span> oxalate</p>\n</td>\n<td>\n<p>Fluoride inhibits glycolysis, and <span class=\"customMeta\" data-dictid=\"28ddbfbaa51692777194aa6875fac4\">oxalate</span> prevents <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> by precipitating calcium</p>\n</td>\n<td>\n<p>Glucose (especially when testing will be delayed), blood alcohol, <span class=\"customMeta\" data-dictid=\"b82539c9ae1692777191a3f7ddd7bb\">lactic</span> acid</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient has been brought with severe bleeding to your ER. His blood group is unknown. Fresh frozen plasma from which of the following blood groups can be given?", "options": [{"label": "A", "text": "O", "correct": true}, {"label": "B", "text": "AB", "correct": false}, {"label": "C", "text": "B", "correct": false}, {"label": "D", "text": "A", "correct": false}], "correct_answer": "A. O", "question_images": [], "explanation_images": [], "explanation": "<p>Correct option A: O\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What does the following image show?", "options": [{"label": "A", "text": "Autophagy", "correct": false}, {"label": "B", "text": "Emperipolesis", "correct": true}, {"label": "C", "text": "Phagocytosis", "correct": false}, {"label": "D", "text": "Amoebic autophagy", "correct": false}], "correct_answer": "B. Emperipolesis", "question_images": ["https://image.prepladder.com/content/NTNrJAcHF90F6H0H4zU51688021993.png"], "explanation_images": ["https://image.prepladder.com/content/NTNrJAcHF90F6H0H4zU51688021993.png"], "explanation": "<p>Correct option B: E\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Acid mucin is stained by:", "options": [{"label": "A", "text": "PAS", "correct": false}, {"label": "B", "text": "Alcian blue", "correct": true}, {"label": "C", "text": "Masson trichrome", "correct": false}, {"label": "D", "text": "Phosphotungstic acid haematoxylin (PTAH)", "correct": false}], "correct_answer": "B. Alcian blue", "question_images": [], "explanation_images": [], "explanation": "<p>Correct option B: Alcian blu\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is the major source of plasma Von Willebrand factor?", "options": [{"label": "A", "text": "Platelets", "correct": false}, {"label": "B", "text": "Lymphocytes", "correct": false}, {"label": "C", "text": "Macrophages", "correct": false}, {"label": "D", "text": "Endothelial cells", "correct": true}], "correct_answer": "D. Endothelial cells", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Endothelial C\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient who receives recurrent transfusions for thalassemia develops fever and chills during this time. There is no evidence of hemolysis. Which of the following measures can decrease the rate of transfusion reactions?", "options": [{"label": "A", "text": "Leukoreduced RBCs", "correct": true}, {"label": "B", "text": "Antibiotics", "correct": false}, {"label": "C", "text": "Irradiation", "correct": false}, {"label": "D", "text": "Washed RBCs", "correct": false}], "correct_answer": "A. Leukoreduced RBCs", "question_images": [], "explanation_images": [], "explanation": "<p>Correct option A: Leukoreduced RBC\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A CKD patient had to undergo dialysis, and his Hb was 5.2 g/dL. So two blood transfusions were to be given. The first bag was completed in 2 hours. The second was started, and in the midway, he developed shortness of breath and hypertension. Vitals were BP: 180/120 mmHg and pulse rate: 110/min. What is the cause?", "options": [{"label": "A", "text": "Allergic", "correct": false}, {"label": "B", "text": "Transfusion-related circulatory overload", "correct": true}, {"label": "C", "text": "Transfusion-related acute lung injury", "correct": false}, {"label": "D", "text": "Febrile non-hemolytic transfusion reaction", "correct": false}], "correct_answer": "B. Transfusion-related circulatory overload", "question_images": [], "explanation_images": [], "explanation": "<p>Correct option B: Transfusion-related <span class=\"customMeta\" data-dictid=\"f3739d892c1692777184b2e134615c\">circulatory</span> ov\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which test evaluates the extrinsic pathway ?", "options": [{"label": "A", "text": "aPTT", "correct": false}, {"label": "B", "text": "PT", "correct": true}, {"label": "C", "text": "TT", "correct": false}, {"label": "D", "text": "Bleeding time", "correct": false}], "correct_answer": "B. PT", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - PT\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">\n<tbody>\n<tr>\n<td><strong>Stage</strong></td>\n<td><strong>Process</strong></td>\n<td><strong>Factors/Components involved</strong></td>\n</tr>\n<tr>\n<td>Initiation</td>\n<td>Formation of a <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> plug</td>\n<td>Tissue factor (TF), Factor VII</td>\n</tr>\n<tr>\n<td>Amplification</td>\n<td>Activation and <span class=\"customMeta\" data-dictid=\"9bb62ce0f71692777197fcc2b5f29c\">recruitment</span> of additional <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> factors</td>\n<td>Factors VIII, IX, XI, and XIII, <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">Platelet</span> phospholipids</td>\n</tr>\n<tr>\n<td>Propagation</td>\n<td>Formation of thrombin</td>\n<td>Factors VIII, IX, XI, and XIII, <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">Platelet</span> phospholipids, <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">Calcium</span> ions</td>\n</tr>\n<tr>\n<td>Consolidation</td>\n<td>Conversion of <span class=\"customMeta\" data-dictid=\"a137b7092a16927772025412d4ef05\">fibrinogen</span> to fibrin</td>\n<td>Thrombin, Fibrinogen, Factor XIII</td>\n</tr>\n<tr>\n<td>Stabilization</td>\n<td>Cross-linking of <span class=\"customMeta\" data-dictid=\"18c2380be716927772020c9b2863de\">fibrin</span> strands</td>\n<td>Factor XIII</td>\n</tr>\n<tr>\n<td>Fibrinolysis</td>\n<td>Breakdown of <span class=\"customMeta\" data-dictid=\"18c2380be716927772020c9b2863de\">fibrin</span> clots</td>\n<td>Plasminogen, Tissue <span class=\"customMeta\" data-dictid=\"bab1a0998e1692777195514ec82e5f\">plasminogen</span> <span class=\"customMeta\" data-dictid=\"a095f733351692777180a29940c98a\">activator</span> (tPA), Plasmin</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Prolonged bleeding time is seen in:", "options": [{"label": "A", "text": "Hemophilia A", "correct": false}, {"label": "B", "text": "Hemophilia B", "correct": false}, {"label": "C", "text": "Von Willebrand disease", "correct": true}, {"label": "D", "text": "Both A and B", "correct": false}], "correct_answer": "C. Von Willebrand disease", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Von Willebrand D\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td> </td>\n<td><strong>Platelet count</strong></td>\n<td><strong>BT</strong></td>\n<td><strong>PTT</strong></td>\n<td><strong>aPTT</strong></td>\n</tr>\n<tr>\n<td><strong>Bernard-Soulier syndrome</strong></td>\n<td>Normal</td>\n<td>Elevated</td>\n<td>Normal</td>\n<td>Normal</td>\n</tr>\n<tr>\n<td><strong>Glanzmann thrombasthenia</strong></td>\n<td>Normal</td>\n<td>Elevated</td>\n<td>Normal</td>\n<td>Normal</td>\n</tr>\n<tr>\n<td><strong>ITP</strong></td>\n<td>Low</td>\n<td>Elevated</td>\n<td>Normal</td>\n<td>Normal</td>\n</tr>\n<tr>\n<td><strong>Hemophilia A</strong></td>\n<td>Normal</td>\n<td>Normal</td>\n<td>Normal</td>\n<td>Elevated</td>\n</tr>\n<tr>\n<td><strong>Hemophilia B</strong></td>\n<td>Normal</td>\n<td>Normal</td>\n<td>Normal</td>\n<td>Elevated</td>\n</tr>\n<tr>\n<td><strong>HUS / TTP</strong></td>\n<td>Low</td>\n<td>Elevated</td>\n<td>Normal</td>\n<td>Normal</td>\n</tr>\n<tr>\n<td><strong>DIC</strong></td>\n<td>Low</td>\n<td>Elevated</td>\n<td>Elevated</td>\n<td>Elevated</td>\n</tr>\n<tr>\n<td><strong>vWD</strong></td>\n<td>Normal</td>\n<td>Elevated</td>\n<td>Normal</td>\n<td>Elevated</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the maximum duration for TRALI to occur after a blood transfusion?", "options": [{"label": "A", "text": "12 hours", "correct": false}, {"label": "B", "text": "24 hours", "correct": false}, {"label": "C", "text": "6 hours", "correct": true}, {"label": "D", "text": "48 hours", "correct": false}], "correct_answer": "C. 6 hours", "question_images": [], "explanation_images": [], "explanation": "<p>Correct option C: 6 hou\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Arrange the following clotting factors in the sequence that they follow in the coagulation cascade: 13 12 10 5 9", "options": [{"label": "A", "text": "2, 3, 4, 1, 5", "correct": false}, {"label": "B", "text": "2, 5, 3, 4, 1", "correct": true}, {"label": "C", "text": "1, 2, 5, 3, 4", "correct": false}, {"label": "D", "text": "2, 3, 5, 4, 1", "correct": false}], "correct_answer": "B. 2, 5, 3, 4, 1", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/LVK0qtGw3YLGkDSvhPuW1691233650.png", "https://image.prepladder.com/content/LVK0qtGw3YLGkDSvhPuW1691233650.png"], "explanation": "<p>Correct Option B - 2, 5, 3, 4,\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 33 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A patient presents with a tingling sensation in both legs, polyuria, and weight loss. Based on the given bone marrow aspirate findings, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Multiple myeloma with renal failure", "correct": true}, {"label": "B", "text": "SACD with vitamin B12 deficiency", "correct": false}, {"label": "C", "text": "SACD with diabetes", "correct": false}, {"label": "D", "text": "Waldenstrom's Macroglobulinemia", "correct": false}], "correct_answer": "A. Multiple myeloma with renal failure", "question_images": ["https://image.prepladder.com/content/ah9a3OSrqzQkPhz8BRc51724851016.png"], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"652999e42416927771936e1f3246e3\">Multiple myeloma</span> with <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> failu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following blood products with their shelf lives. a. 1-Granulocytes A- 5 days b. 2- PRBC B- 24 hours c. 3- SDP C- 42 days d. 4- CRYO D- 1 year", "options": [{"label": "A", "text": "1-A, 2-C, 3D, 4-B", "correct": false}, {"label": "B", "text": "1-B, 2-D, 3-A, 4-C", "correct": false}, {"label": "C", "text": "1-C, 2-A, 3-B, 4-D", "correct": false}, {"label": "D", "text": "1-B, 2-C, 3-A, 4-D", "correct": true}], "correct_answer": "D. 1-B, 2-C, 3-A, 4-D", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - 1-B, 2-C, 3-A, 4-D\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:626px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Component</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Temperature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Shelf life</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Whole blood / PRBC</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">2-6℃</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">21 days (ACD/CPD)</p>\n<p style=\"text-align: center;\">35 days (CPDA)</p>\n<p style=\"text-align: center;\">42 days (SAGM)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Platelets rich <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> </strong></p>\n<ul>\n<li>Random Donor platelets</li>\n<li>Single donor platelets</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">20-24℃</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">5 days of agitation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Fresh frozen <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> & Cryoprecipitate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">< -30℃</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">1 year</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Granulocyte</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">-</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p style=\"text-align: center;\">24 hours</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is used in the treatment of Hemophilia B?", "options": [{"label": "A", "text": "Fresh frozen plasma", "correct": true}, {"label": "B", "text": "Cryoprecipitate", "correct": false}, {"label": "C", "text": "Factor 8", "correct": false}, {"label": "D", "text": "Tranexamic acid", "correct": false}], "correct_answer": "A. Fresh frozen plasma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Fresh\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In a trauma patient with an unknown blood group who is unstable and requires urgent blood transfusion, which type of blood should be transfused? A positive AB positive O positive O negative", "options": [{"label": "A", "text": "4 only", "correct": true}, {"label": "B", "text": "2 and 3", "correct": false}, {"label": "C", "text": "3 and 4", "correct": false}, {"label": "D", "text": "2, 3, and 4", "correct": false}], "correct_answer": "A. 4 only", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not seen in a delayed hemolytic transfusion reaction?", "options": [{"label": "A", "text": "Raised LDH", "correct": false}, {"label": "B", "text": "Raised indirect bilirubin", "correct": false}, {"label": "C", "text": "No improvement in Hb despite transfusion", "correct": false}, {"label": "D", "text": "Cola-colored urine after 2 hrs", "correct": true}], "correct_answer": "D. Cola-colored urine after 2 hrs", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Cola-colored <span class=\"customMeta\" data-dictid=\"0096f2a7631692777201eb9f21d5a7\">urine</span> after 2 <span class=\"customMeta\" data-dictid=\"136c4bdd441692777189c5b2e976a0\">hrs</span&g\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "How does Total plasma exchange help in the management of TTP", "options": [{"label": "A", "text": "TPE removes the Von Willebrand factor", "correct": false}, {"label": "B", "text": "TPE removes the Antiplatelet antibodies", "correct": false}, {"label": "C", "text": "TPE removes Anti ADAMTS13 autoantibodies and thereby increases the ADAMTS protease activity", "correct": true}, {"label": "D", "text": "TPE replenishes the coagulation factor", "correct": false}], "correct_answer": "C. TPE removes Anti ADAMTS13 autoantibodies and thereby increases the ADAMTS protease activity", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Treatment of TTP</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Plasma exchange (PEX) with high-dose <span class=\"customMeta\" data-dictid=\"a3e96d80e9169277718551158bbcd4\">corticosteroid</span> therapy.</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>It is the mainstay of treatment in TTP.</strong></li>\n<li>Corticosteroids operate by decreasing the activity of the <span class=\"customMeta\" data-dictid=\"77c058b3b21692777197f5fd539d12\">reticuloendothelial</span> system as well as decreasing <span class=\"customMeta\" data-dictid=\"06e07ce7821692777182e8ffd9676f\">autoantibody</span> production.</li>\n<li>Both the ultra-large <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">VWF</span> multimers and the ADAMTS13 autoantibodies are effectively removed from <span class=\"customMeta\" data-dictid=\"337d16dac5169277718474b97f6e4a\">circulation</span> by <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> exchange therapy.</li>\n<li>The recommended volume of exchange is one <strong>estimated <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> volume (usually 40 mL/kg of body weight)</strong> with each treatment.</li>\n<li>The <strong>recommended dose for corticosteroids is </strong><strong>1 mg/kg per day of prednisolone.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rituximab</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>An anti-CD20 <span class=\"customMeta\" data-dictid=\"b2b82438d6169277719287eb450079\">monoclonal</span> <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> was found to help treat TTP <span class=\"customMeta\" data-dictid=\"3790c638ab16927771970a0a41d3ab\">refractory</span> to PEX. It targets B-lymphocytes and has a <strong>good response rate in <span class=\"customMeta\" data-dictid=\"3790c638ab16927771970a0a41d3ab\">refractory</span> and relapsed TTP.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Caplacizumab</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It has a high potential for TTP.</li>\n<li>It is a humanized <span class=\"customMeta\" data-dictid=\"b2b82438d6169277719287eb450079\">monoclonal</span> <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> fragment (a bivalent, variable-domain-only fragment) that attacks the A1 section of <span class=\"customMeta\" data-dictid=\"0327d20161169277720287847fa436\">VWF</span> and prevents <span class=\"customMeta\" data-dictid=\"e7032bae7f1692777195d693722e54\">platelet</span> adhesion.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Others</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Splenectomy,</li>\n<li>Vincristine,</li>\n<li>Cyclosporine and</li>\n<li>Cyclophosphamide.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the commonest cause of a hypercoagulable state?", "options": [{"label": "A", "text": "Antithrombin III deficiency", "correct": false}, {"label": "B", "text": "Protein C deficiency", "correct": false}, {"label": "C", "text": "Factor V Leiden mutation", "correct": true}, {"label": "D", "text": "G20210A prothrombin gene mutation", "correct": false}], "correct_answer": "C. Factor V Leiden mutation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Primary causes of Hypercoagulable states </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Common causes</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Factor V <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> (Factor V Leiden)</li>\n<li><strong>Prothrombin <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> (G20210A)</strong> - It is comparatively less common than <span class=\"customMeta\" data-dictid=\"14693f062c16927772024df5839c43\">Factor V</span> <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> <strong>(Option D ruled out)</strong></li>\n<li>Elevated factor levels (VIII, IX, XI, or fibrinogen)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rare causes</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Antithrombin III <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> </strong><strong>(Option A ruled out)</strong></li>\n<li><strong>Protein C <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> </strong><strong>(Option B ruled out)</strong></li>\n<li>Protein S deficiency</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Very rare causes</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Fibrinolysis Defects</li>\n<li>Homozygous Homocystinuria</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Secondary causes of Hypercoagulable states</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Major risk factors</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Myocardial infarction</li>\n<li>Atrial fibrillation</li>\n<li>Tissue injury (surgery, fracture, burn)</li>\n<li>Cancer</li>\n<li>Prosthetic <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> valves</li>\n<li>DIC</li>\n<li>Heparin-induced thrombocytopenia</li>\n<li>Prolonged rest or immobilisation</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Additional risk factors for thrombosis</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cardiomyopathy</li>\n<li>Nephrotic syndrome</li>\n<li>Hyperestrogenic states (pregnancy and postpartum)</li>\n<li>Oral <span class=\"customMeta\" data-dictid=\"a13cdc2a8a1692777185da87f2ff85\">contraceptive</span> use</li>\n<li>Sickle cell anemia</li>\n<li>Smoking</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child is brought to the emergency department with a large lesion on his forearm. As a surgery resident, you decide to excise the lesion in the emergency operation theatre. Which of the following investigations will test the entire coagulation pathway?", "options": [{"label": "A", "text": "Activated partial thromboplastin time", "correct": false}, {"label": "B", "text": "Prothrombin time", "correct": false}, {"label": "C", "text": "Thromboelastography", "correct": true}, {"label": "D", "text": "Bleeding time", "correct": false}], "correct_answer": "C. Thromboelastography", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tn2s0IVJQaZCwnJ4WDY91745841038.png", "https://image.prepladder.com/notes/zNCGb6iqqBFVzjorDxnP1746608914.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 18 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Anticoagulant used in the test tube for estimating HbA1c?", "options": [{"label": "A", "text": "Warfarin", "correct": false}, {"label": "B", "text": "Sodium Fluoride", "correct": false}, {"label": "C", "text": "EDTA", "correct": true}, {"label": "D", "text": "Heparin", "correct": false}], "correct_answer": "C. EDTA", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/bYXFkq9AwBbcFrFlStPB1741890953.png", "https://image.prepladder.com/content/mABy9r6QE4u6pgNOMxWY1741890984.png", "https://image.prepladder.com/content/waXCXWHQpdLVGmycASjd1741891015.png", "https://image.prepladder.com/content/6w3XBUX0lOSIEzt7d7W81741891046.png", "https://image.prepladder.com/content/7VhqJOLqQ5dJgHoPETHO1741891075.png", "https://image.prepladder.com/content/IAJrGL3j70jZAe0XfLKx1741891104.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Colour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-coagulants</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Uses</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Purple/Lavender </strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"161\" src=\"https://image.prepladder.com/content/bYXFkq9AwBbcFrFlStPB1741890953.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>EDTA (Ca2+ chelating anticoagulant) <strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CBC, <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">Peripheral</span> Smear, ESR, HbA1c.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Light Blue</strong><strong> </strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"808\" src=\"https://image.prepladder.com/content/mABy9r6QE4u6pgNOMxWY1741890984.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Citrate (Ca2+ chelating anticoagulant).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ESR, PT (Prothrombin Time), <span class=\"customMeta\" data-dictid=\"c91819a65716927771810b66ea6869\">APTT</span> (Activated Partial <span class=\"customMeta\" data-dictid=\"9b51982d06169277720063c9420fbb\">Thromboplastin</span> Time), and INR (International Normalized Ratio)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Red </strong></p>\n<img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"2096\" src=\"https://image.prepladder.com/content/waXCXWHQpdLVGmycASjd1741891015.png\" width=\"500\"/><br/>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No anti-coagulant is added</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum studies (blood chemistry, serology, and <span class=\"customMeta\" data-dictid=\"40e5b091961692777183c9488699bb\">blood bank</span> testing)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Yellow</strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"2063\" src=\"https://image.prepladder.com/content/6w3XBUX0lOSIEzt7d7W81741891046.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clot activator/Gel separator</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum tests, such as hormone tests, chemistry panels, and serological tests (LFT, RFT, <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> electrolytes)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grey</strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"1787\" src=\"https://image.prepladder.com/content/7VhqJOLqQ5dJgHoPETHO1741891075.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sodium Fluoride</p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood Glucose</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Green </strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"500\" src=\"https://image.prepladder.com/content/IAJrGL3j70jZAe0XfLKx1741891104.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Heparin</p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ABG, Osmotic fragility, flow cytometry, immunophenotyping</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Vacutainer used in serum electrolyte estimation:", "options": [{"label": "A", "text": "Green", "correct": false}, {"label": "B", "text": "Lavender", "correct": false}, {"label": "C", "text": "Yellow", "correct": true}, {"label": "D", "text": "Grey", "correct": false}], "correct_answer": "C. Yellow", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/mJfkQqrJ5cgxM6voIEh91741891172.png", "https://image.prepladder.com/content/NzuhYdKhjJ0eWXCx6fxD1741891200.png", "https://image.prepladder.com/content/P8bcdG7VJCaVIqcTk9qW1741891227.png", "https://image.prepladder.com/content/W4F1MnEuoibtiBy6vABb1741891256.png", "https://image.prepladder.com/content/vq1eIi5vXQv8wzzLcrRS1741891292.png", "https://image.prepladder.com/content/AMLaI5bAAeovip3EA8X11741891320.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Types of Vacutainers</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Colour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anti-coagulants</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Uses</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Purple/Lavender<strong> </strong></p>\n<p><strong>(Option B)</strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"161\" src=\"https://image.prepladder.com/content/mJfkQqrJ5cgxM6voIEh91741891172.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>EDTA (Ca2+ chelating anticoagulant)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>CBC, <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">Peripheral</span> Smear, ESR, HbA1c.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Light Blue<strong> </strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"808\" src=\"https://image.prepladder.com/content/NzuhYdKhjJ0eWXCx6fxD1741891200.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Citrate (Ca2+ chelating anticoagulant)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ESR, PT (Prothrombin Time), <span class=\"customMeta\" data-dictid=\"c91819a65716927771810b66ea6869\">APTT</span> (Activated Partial <span class=\"customMeta\" data-dictid=\"9b51982d06169277720063c9420fbb\">Thromboplastin</span> Time), and INR (International Normalized Ratio).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Red</p>\n<img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"2096\" src=\"https://image.prepladder.com/content/P8bcdG7VJCaVIqcTk9qW1741891227.png\" width=\"500\"/><br/>\n<br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>No anti-coagulant is added.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum studies (blood chemistry, serology, and <span class=\"customMeta\" data-dictid=\"40e5b091961692777183c9488699bb\">blood bank</span> testing).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Yellow</p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"2063\" src=\"https://image.prepladder.com/content/W4F1MnEuoibtiBy6vABb1741891256.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Clot activator/Gel separator</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Serum tests, such as hormone tests, chemistry panels, and serological tests (LFT, RFT, <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> electrolytes).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Grey <strong>(Option D)</strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"1787\" src=\"https://image.prepladder.com/content/vq1eIi5vXQv8wzzLcrRS1741891292.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sodium Fluoride</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood glucose.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Green <strong> </strong><strong>(Option A)</strong></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"500\" src=\"https://image.prepladder.com/content/AMLaI5bAAeovip3EA8X11741891320.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Heparin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ABG, Osmotic fragility, flow cytometry, immunophenotyping.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following diseases are correctly associated with their respective inclusion bodies?", "options": [{"label": "A", "text": "Rabies - Lewy bodies", "correct": false}, {"label": "B", "text": "Parkinson’s disease - Dutcher bodies", "correct": false}, {"label": "C", "text": "Multiple myeloma - Negri bodies", "correct": false}, {"label": "D", "text": "Malakoplakia - Michaelis Gutmann bodies", "correct": true}], "correct_answer": "D. Malakoplakia - Michaelis Gutmann bodies", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/lSuWiRb0ijlKGoUxgz1K1741889931.png", "https://image.prepladder.com/content/OceTtkQ1I2J5s2XVwimj1741889973.png", "https://image.prepladder.com/content/DRZiPTfx9vNU3EogTktu1741890000.png", "https://image.prepladder.com/content/INBtWSrBKnxEPG1VSWZF1741890028.png", "https://image.prepladder.com/content/GxPJ9yfQmRKe9TVMM7WK1741890054.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disease </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inclusion bodies</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Rabies </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Negri bodies </strong>are cytoplasmic, round to oval, <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> inclusions found in <span class=\"customMeta\" data-dictid=\"d3b981dbf916927771961c29f24614\">pyramidal</span> neurons of the <span class=\"customMeta\" data-dictid=\"7ce110705616927771896c58ac81b5\">hippocampus</span> and<strong> Purkinje cells of the cerebellum</strong>, sites usually devoid of inflammation.</p>\n<img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"448\" src=\"https://image.prepladder.com/content/lSuWiRb0ijlKGoUxgz1K1741889931.png\" width=\"500\"/><br/>\n\t\t\t </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Parkinson’s disease </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lewy bodies </strong></p>\n<ul>\n<li>These are single or multiple, cytoplasmic, eosinophilic, round to elongated inclusions that often have a dense core surrounded by a pale halo.</li>\n<li>They are composed of fine filaments, densely packed in the core but loose at the rim; these filaments are composed of <strong>α-synuclein.</strong></li>\n</ul>\n<img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"500\" src=\"https://image.prepladder.com/content/OceTtkQ1I2J5s2XVwimj1741889973.png\" width=\"500\"/><br/>\n\t\t\t </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Multiple <span class=\"customMeta\" data-dictid=\"aa6a0dfcb61692777193561ed10fac\">myeloma</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The <span class=\"customMeta\" data-dictid=\"7fb01b5ad51692777188c3cb1733f9\">globular</span> inclusions are <span class=\"customMeta\" data-dictid=\"047f8930dd1692777197fed61e213c\">referred</span> to as<strong> <span class=\"customMeta\" data-dictid=\"b6dea0733f1692777197964f7d1bf6\">Russell bodies</span> </strong>(if cytoplasmic) or <strong>Dutcher bodies</strong> (if nuclear).</p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"315\" src=\"https://image.prepladder.com/content/DRZiPTfx9vNU3EogTktu1741890000.png\" width=\"500\"/></p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"392\" src=\"https://image.prepladder.com/content/INBtWSrBKnxEPG1VSWZF1741890028.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Malakoplakia </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Michaelis Gutmann bodies: </strong>Laminated mineralized concretions resulting from <span class=\"customMeta\" data-dictid=\"54de8b79a91692777183e608bc0dd4\">calcium</span> deposition in enlarged lysosomes.</p>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"343\" src=\"https://image.prepladder.com/content/GxPJ9yfQmRKe9TVMM7WK1741890054.png\" width=\"500\"/></p>\n<br/>\n\t\t\t </td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 13 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which of the following statements regarding the glomerular basement membrane (GBM) is true?", "options": [{"label": "A", "text": "The GBM is primarily composed of collagen type I and elastin.", "correct": false}, {"label": "B", "text": "The GBM is a selective barrier between the glomerular capillaries and Bowman's capsule.", "correct": true}, {"label": "C", "text": "Thickening of the GBM is a characteristic feature of minimal change disease.", "correct": false}, {"label": "D", "text": "The GBM is impermeable to large molecules such as albumin.", "correct": false}], "correct_answer": "B. The GBM is a selective barrier between the glomerular capillaries and Bowman's capsule.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/qB3wlFemrs22cEHOMq6G1737691260.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following kidney findings will be seen in malignant hypertension?", "options": [{"label": "A", "text": "Putty kidney", "correct": false}, {"label": "B", "text": "Leather grain kidney", "correct": false}, {"label": "C", "text": "Flea-bitten kidney", "correct": true}, {"label": "D", "text": "Waxy kidney", "correct": false}], "correct_answer": "C. Flea-bitten kidney", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/UI4mOBAZgWpyfqmPZYn51737691491.png", "https://image.prepladder.com/content/6sxBqFmldRUPRghmCakj1737691429.png", "https://image.prepladder.com/content/E4KtviPCfhN0YlQdnwzv1737691457.png", "https://image.prepladder.com/content/ROWa5iQb4ykEy6xxoqPF1737691384.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 60-year-old female presents with a history of recurrent urinary tract infections and lower abdominal pain. Upon physical examination, palpable masses are noted in the pelvis. Urinalysis reveals persistent pyuria. A biopsy was done on the bladder lesions, which is shown below. Which of the following conditions is most likely responsible for the patient's presentation?", "options": [{"label": "A", "text": "Bladder carcinoma", "correct": false}, {"label": "B", "text": "Malakoplakia", "correct": true}, {"label": "C", "text": "Schistosomiasis", "correct": false}, {"label": "D", "text": "Tuberculous cystitis", "correct": false}], "correct_answer": "B. Malakoplakia", "question_images": ["https://image.prepladder.com/content/xipnYcJZi1ar5fPJfdKs1737691571.png"], "explanation_images": ["https://image.prepladder.com/notes/rVgzNQfDTu8Hjv8dvw2Z1743482939.png", "https://image.prepladder.com/content/pB7akuHUZWunr3K9an5n1737691589.png", "https://image.prepladder.com/notes/t8JzEgvUxThOuwgzpVjR1743483351.png", "https://image.prepladder.com/notes/gHauT91qEnScaO90UdJN1743483768.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements are true regarding autosomal dominant polycystic kidney disease? 1) The gene associated with this condition is seen on chromosome 6. 2) The affected protein is fibrocystin. 3) It is associated with cyst formation in other organs. 4) The most common cause of death in these patients is hypertensive heart disease.", "options": [{"label": "A", "text": "1,2,3,4", "correct": false}, {"label": "B", "text": "3,4", "correct": true}, {"label": "C", "text": "2,3", "correct": false}, {"label": "D", "text": "2,3,4", "correct": false}], "correct_answer": "B. 3,4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/4zmNzo3DcVPtR39MGItn1737691789.png", "https://image.prepladder.com/content/wpTB1LQRR2anl4ZWFMDG1737691734.png", "https://image.prepladder.com/content/PnIgwh95nyDa4DahEkOc1737691869.png", "https://image.prepladder.com/notes/PkFHGD54Un42iYnUAO8G1743569539.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ADPKD</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>ARPKD</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Affected age group</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adults</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Children</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cysts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Are present in both outer and inner surfaces</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present only on the inner surface.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Involved gene</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>PKD 1 on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 16</li>\n<li>PKD 2 on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 4</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>PKHD on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 6</p>\n<p>(Statement 2)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Protein affected</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>polycystin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fibrocystin (Statement 3)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:148px\">\n<p>Histology</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p> </p>\n<p> </p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Polycystic_kidney_disease_--_2_-_high_mag.jpg\" data-tags=\"\" height=\"335\" src=\"https://image.prepladder.com/content/4zmNzo3DcVPtR39MGItn1737691789.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p> </p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Patrickwalker , MD\" data-hash=\"\" data-license=\"NA\" data-source=\"https://aspneph.org/autosomal-recessive-polycystic-kidney-disease-arpkd/\" data-tags=\"\" height=\"336\" src=\"https://image.prepladder.com/content/wpTB1LQRR2anl4ZWFMDG1737691734.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:148px\">\n<p>Complications</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Coronary or <span class=\"customMeta\" data-dictid=\"dd2daa0c6216927771893c9cab82d9\">hypertensive</span> heart disease (40%). <strong>(Statement 4)</strong></li>\n<li>Infection (25%).</li>\n<li>Ruptured <span class=\"customMeta\" data-dictid=\"92ff33318a16927771828d959514b8\">berry</span> <span class=\"customMeta\" data-dictid=\"f2c92eaffe16927771819978aa5666\">aneurysm</span> or <span class=\"customMeta\" data-dictid=\"dd2daa0c6216927771893c9cab82d9\">hypertensive</span> <span class=\"customMeta\" data-dictid=\"c7f167b8df1692777190bcd90fe428\">intracerebral</span> haemorrhage (15%).</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Neonatal period:\n\t\t\t\t<ul>\n<li>Respiratory failure due to <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">pulmonary</span> hypoplasia.</li>\n<li>Renal failure.</li>\n</ul>\n</li>\n<li>Childhood and adolescence:\n\t\t\t\t<ul>\n<li>Progressive <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> failure leading to ESRD.</li>\n<li>Complications of CKD.</li>\n<li>Complications from <span class=\"customMeta\" data-dictid=\"3268e86ce01692777188f249c64d6e\">hepatic</span> fibrosis.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:148px\">\n<p>Images</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p> </p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"CDC/ Dr. Edwin P. Ewing, Jr.\" data-hash=\"\" data-license=\"Public domain\" data-source=\"https://commons.wikimedia.org/wiki/File:Polycystic_kidneys,_gross_pathology_CDC_PHIL.png\" data-tags=\"\" height=\"424\" src=\"https://image.prepladder.com/content/PnIgwh95nyDa4DahEkOc1737691869.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<figure class=\"caption_element\"><img alt=\"ARPKD Gross\" data-author=\"NA\" data-hash=\"6235\" data-license=\"NA\" data-source=\"NA\" data-tags=\"April2025\" height=\"310\" src=\"https://image.prepladder.com/notes/PkFHGD54Un42iYnUAO8G1743569539.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following types of renal crystals with their characteristics Types of Renal Crystals Characteristics 1. Calcium Oxalate Monohydrate A. Coffin lid-shaped crystals, commonly found in alkaline urine 2.. Uric Acid B. Rhomboid-shaped crystals, typically seen in acidic urine. 3. Cystine C. Dumbbell or ovoid-shaped crystals are often colourless in acidic urine. 4. . Struvite (Magnesium Ammonium Phosphate) D. Hexagonal plates, often associated with acidic urine", "options": [{"label": "A", "text": "1-D, 2-B, 3-C, 4-A", "correct": false}, {"label": "B", "text": "1-A, 2-B, 3-D, 4-A", "correct": false}, {"label": "C", "text": "1-C, 2-B, 3-D, 4-A", "correct": true}, {"label": "D", "text": "1-C, 2-D, 3-B, 4-A", "correct": false}], "correct_answer": "C. 1-C, 2-B, 3-D, 4-A", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/0iQLd9Zv1VZYsQFmu3Dw1737021562.png", "https://image.prepladder.com/notes/iktM2kHbaX2prAP2PJmW1737021657.png", "https://image.prepladder.com/notes/YBkLNRnQzY2fa8QnsdTa1737021760.png", "https://image.prepladder.com/notes/EvjeuJ9KnNfCO4MJCL001737021887.png", "https://image.prepladder.com/notes/JKgK0ag4H7pvuYR2tOou1737022263.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"microscopic appearance of Struvite\" data-author=\"Joel Mills\" data-hash=\"782\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Struvite#/media/File:Struvite_crystals_dog_with_scale_1.JPG\" data-tags=\"January2025\" height=\"252\" src=\"https://image.prepladder.com/notes/0iQLd9Zv1VZYsQFmu3Dw1737021562.png\" width=\"300\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Struvite/ Staghorn stones:</p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Radioopaque.</li>\n<li>Seen in <span class=\"customMeta\" data-dictid=\"b95c7f7b821692777181df660ee7ff\">alkaline</span> urine.</li>\n<li>Rectangular/coffin lid appearance.</li>\n<li>Associated with urea-splitting organisms.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"microscopic appearance of Cystine Stones\" data-author=\"Lance Wheeler\" data-hash=\"783\" data-license=\"CC BY-SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Cystinuria#/media/File:Cystine_Crystals_in_Canine_Urine_Sediment.jpg\" data-tags=\"January2025\" height=\"378\" src=\"https://image.prepladder.com/notes/iktM2kHbaX2prAP2PJmW1737021657.png\" width=\"300\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cystine Stones</p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Radiopaque.</li>\n<li>Seen in <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> urine.</li>\n<li>Hexagonal Shaped.</li>\n<li>Very hard stones.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"microscopic appearance of Calcium Oxalate Monohydrate stones\" data-author=\"Nida Nasir Adel Najar Mahmoud Al Ahmad\" data-hash=\"784\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/Microscopic-display-of-calcium-oxalate-monohydrate-and-dihydrate-crystals-in_fig3_330797345\" data-tags=\"January2025\" height=\"199\" src=\"https://image.prepladder.com/notes/YBkLNRnQzY2fa8QnsdTa1737021760.png\" width=\"400\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Calcium Oxalate Monohydrate stones</p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Radiopaque.</li>\n<li>Seen in <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> urine.</li>\n<li>Dumbell shaped.</li>\n<li>Most common type of <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> calculi.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"microscopic appearance of Uric Acid crystals\" data-author=\"Doruk Salancı,\" data-hash=\"785\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Uric_acid_crystals_(urine)_-_%C3%9Crik_asit_kristalleri_(idrar)_-_03.png\" data-tags=\"January2025\" height=\"258\" src=\"https://image.prepladder.com/notes/EvjeuJ9KnNfCO4MJCL001737021887.png\" width=\"300\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Uric Acid crystals</p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Radiolucent.</li>\n<li>Seen in <span class=\"customMeta\" data-dictid=\"3a983e569716927771805ed22b90d7\">acidic</span> urine.</li>\n<li>Rhomboids or parallelograms.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"microscopic appearance of Ammonium Urate crystals\" data-author=\"Ajay Kumar Chaurasiya\" data-hash=\"786\" data-license=\"CC BY-SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Ammonium_biurate_crystals_found_during_Urine_Microscopy.jpg\" data-tags=\"January2025\" height=\"265\" src=\"https://image.prepladder.com/notes/JKgK0ag4H7pvuYR2tOou1737022263.png\" width=\"300\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ammonium Urate crystals</p>\n\t\t\t \n\n\t\t\t<ul>\n<li>Radiolucent.</li>\n<li>Associated with <span class=\"customMeta\" data-dictid=\"452c3c115d169277719186b3353c18\">laxative</span> abuse.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents with complaints of severe lower abdominal pain, dysuria, and hematuria. She has a history of recurrent urinary tract infections (UTIs). Urinalysis reveals a high pH of 8.5 and the presence of white blood cells. Microscopic examination of the urine sediment shows the following finding. Which of the following is the most likely underlying cause of the patient's current presentation?", "options": [{"label": "A", "text": "Hypercalcemia", "correct": false}, {"label": "B", "text": "Hyperuricemia", "correct": false}, {"label": "C", "text": "Infection with urease-producing bacteria", "correct": true}, {"label": "D", "text": "Cystinuria", "correct": false}], "correct_answer": "C. Infection with urease-producing bacteria", "question_images": ["https://image.prepladder.com/notes/0iQLd9Zv1VZYsQFmu3Dw1737021562.png"], "explanation_images": ["https://image.prepladder.com/notes/0iQLd9Zv1VZYsQFmu3Dw1737021562.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following renal casts with the conditions they are associated with: Renal Cast Type Condition Associated 1. Hyaline casts A. Nephrotic syndrome 2. Granular casts B. Chronic Renal Failure 3. Waxy casts C. Acute tubular necrosis 4. Fatty casts D. Fever", "options": [{"label": "A", "text": "1-C, 2-A, 3-B, 4-D", "correct": false}, {"label": "B", "text": "1-B, 2-D, 3-C, 4-A", "correct": false}, {"label": "C", "text": "1-D, 2-C, 3-B, 4-A", "correct": true}, {"label": "D", "text": "1-D, 2-A,3-C, 4-A", "correct": false}], "correct_answer": "C. 1-D, 2-C, 3-B, 4-A", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/UuLk90wmPQTKPRbfl5IA1737023293.png", "https://image.prepladder.com/notes/mVEbyd2rjH5oPfnK6YXp1737023079.png", "https://image.prepladder.com/notes/XSH3jAI5aPWmsYEfAW8F1737023357.png", "https://image.prepladder.com/notes/jF7lvnTsvz68bl5AR5GR1737023424.png", "https://image.prepladder.com/notes/LUx4uUYIH0MjUE7wLO001737023473.png", "https://image.prepladder.com/notes/58i9q5tFL2XCo4S0dPta1737023516.png", "https://image.prepladder.com/notes/zDn6d8XFdVLh0QiP3aoI1743569877.png", "https://image.prepladder.com/notes/nihNVN1Qpw8OdO4akwdB1737023565.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Renal Cast Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p><strong>Condition Associated</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\"><strong>Images</strong></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Hyaline casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Normal conditions, Fever, Pregnancy</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\"><img alt=\"Hyaline Cast \" data-author=\"Ajay Kumar Chaurasiya,\" data-hash=\"788\" data-license=\"CC BY-SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Hyaline_Cast_in_Urine_Microscopy.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/UuLk90wmPQTKPRbfl5IA1737023293.png\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Muddy Brown/ <span class=\"customMeta\" data-dictid=\"4f63eb15be169277718848d4b4978b\">granular</span> casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Acute <span class=\"customMeta\" data-dictid=\"98d387b7bd1692777201278b27be72\">tubular</span> necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\"><img alt=\"Muddy brown casts-\" data-author=\"Mohsenin V\" data-hash=\"787\" data-license=\"CC BY 4.0\" data-source=\"https://en.wikipedia.org/wiki/Urinalysis#/media/File:RTE_cast,_muddy_granular_cast,_WBC_cast_and_RBC_cast_in_urine.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/mVEbyd2rjH5oPfnK6YXp1737023079.png\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Waxy casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> failure</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\"><img alt=\"Waxy cast\" data-author=\"Tracy Stokol \" data-hash=\"789\" data-license=\"CC BY NC SA 4.0\" data-source=\"https://eclinpath.com/urinalysis/cellular-constituents/waxycomp1/\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/XSH3jAI5aPWmsYEfAW8F1737023357.png\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Fatty casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Nephrotic syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\"><img alt=\" Fatty cast\" data-author=\"Ajay Kumar Chaurasiya\" data-hash=\"790\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Fatty_cast_in_urine.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/jF7lvnTsvz68bl5AR5GR1737023424.png\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>RBC casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Glomerulonephritis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\"><img alt=\"RBC Cast\" data-author=\"Mohsenin V.\" data-hash=\"791\" data-license=\"CC BY 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:RTE_cast,_muddy_granular_cast,_WBC_cast_and_RBC_cast_in_urine.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/LUx4uUYIH0MjUE7wLO001737023473.png\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>WBC casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Pyelonephritis, <span class=\"customMeta\" data-dictid=\"f46ba26d111692777190def3b1d80a\">interstitial</span> nephritis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\"><img alt=\" WBC Cast\" data-author=\"Ajay Kumar Chaurasiya\" data-hash=\"792\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:WBC_cast_in_urine.jpg\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/58i9q5tFL2XCo4S0dPta1737023516.png\"/></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Epithelial casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Renal epithelial injury</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<figure class=\"caption_element\"><img alt=\"Epithelial cell cast\" data-author=\"Ajay Kumar Chaurasiya\" data-hash=\"6236\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.m.wikimedia.org/wiki/File:Epithelial_cell_cast.jpg\" data-tags=\"\" src=\"https://image.prepladder.com/notes/zDn6d8XFdVLh0QiP3aoI1743569877.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Broad casts</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> disease</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\"><img alt=\"Broad cast\" data-author=\"NA\" data-hash=\"793\" data-license=\"NA\" data-source=\"https://webpath.med.utah.edu/TUTORIAL/URINE/URIN074.html\" data-tags=\"January2025\" src=\"https://image.prepladder.com/notes/nihNVN1Qpw8OdO4akwdB1737023565.png\"/></td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with confusion, nausea, and abdominal pain after consuming antifreeze due to stress. Urinalysis reveals elevated BUN and creatinine. Microscopic examination is shown below. Identify the type of cast.", "options": [{"label": "A", "text": "Hyaline casts", "correct": false}, {"label": "B", "text": "Granular casts", "correct": false}, {"label": "C", "text": "Waxy casts", "correct": false}, {"label": "D", "text": "Muddy brown casts", "correct": true}], "correct_answer": "D. Muddy brown casts", "question_images": ["https://image.prepladder.com/notes/mVEbyd2rjH5oPfnK6YXp1737023079.png"], "explanation_images": ["https://image.prepladder.com/notes/mVEbyd2rjH5oPfnK6YXp1737023079.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "All of the following are true about medullary sponge kidney except:", "options": [{"label": "A", "text": "It is more common in adults.", "correct": false}, {"label": "B", "text": "It is characterised by dilated collecting ducts in the renal medulla.", "correct": false}, {"label": "C", "text": "It often presents with recurrent urinary tract infections.", "correct": true}, {"label": "D", "text": "Cysts are lined by cuboidal epithelium.", "correct": false}], "correct_answer": "C. It often presents with recurrent urinary tract infections.", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/IO5rylue1qILqDRPpSi81737023958.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 19 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 12-year-old male child presents to the clinic with a history of progressive hearing loss, blurred vision, and recurrent episodes of hematuria over the past few months.Electron microscopy reveals the ‘basketweave’ appearance of GBM. Which of the following morphological findings is responsible for this appearance?", "options": [{"label": "A", "text": "Effacement of podocyte foot processes", "correct": false}, {"label": "B", "text": "Thickening of the glomerular basement membrane with subepithelial electron-dense deposits", "correct": false}, {"label": "C", "text": "Irregular thickening, thinning, and splitting of the glomerular basement membrane", "correct": true}, {"label": "D", "text": "Mesangial expansion with GBM thickening and eosinophilic nodular glomerulosclerosis", "correct": false}], "correct_answer": "C. Irregular thickening, thinning, and splitting of the glomerular basement membrane", "question_images": ["https://image.prepladder.com/content/y4YfXU9pKue27CssYIDN1737023565.png"], "explanation_images": ["https://image.prepladder.com/content/AFhxNPKFA9q35uZokou01737023652.png", "https://image.prepladder.com/content/1FQPwfBgeHvjpWTO9bAh1737023802.png", "https://image.prepladder.com/content/Zq9XXQdgCMfxEcAhnNw61737577684.png", "https://image.prepladder.com/content/hkHWHmCWMNJxR5ddbUjB1737023888.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old patient with a history of poorly controlled diabetes presents with worsening kidney function. Upon examination, renal biopsy reveals glomerular changes consistent with diabetic nephropathy. Which histological findings would be least likely to be observed in the glomeruli of this patient's kidney biopsy?", "options": [{"label": "A", "text": "Kimmelstiel-Wilson nodule", "correct": false}, {"label": "B", "text": "Diffuse glomerulosclerosis", "correct": false}, {"label": "C", "text": "Arteriolar hyalinosis", "correct": false}, {"label": "D", "text": "Armani-Ebstein lesion", "correct": true}], "correct_answer": "D. Armani-Ebstein lesion", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Uin9qzBrwJn0jySjGC3R1737021884.png", "https://image.prepladder.com/content/NpgrRO8fqOjbbTrrmbKS1737024790.png", "https://image.prepladder.com/content/f7ITWLzqVPeri9KdrKfT1737021983.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old female presents with a history of joint pain, skin rash, and recent onset of shortness of breath. Lab investigations reveal elevated anti-double-stranded DNA antibodies and low complement levels. A kidney biopsy shows &gt;50% involvement of glomeruli with wire loop lesions on light microscopy. Which type of lupus nephritis is most likely observed in the biopsy findings?", "options": [{"label": "A", "text": "Class III", "correct": false}, {"label": "B", "text": "Class IV", "correct": true}, {"label": "C", "text": "Class V", "correct": false}, {"label": "D", "text": "Class VI", "correct": false}], "correct_answer": "B. Class IV", "question_images": ["https://image.prepladder.com/content/2WK15xBFa3dOkVMF0Xpy1737022411.png"], "explanation_images": ["https://image.prepladder.com/content/MW0rwzq5vVWgoPaa0JrD1737022427.png", "https://image.prepladder.com/content/0VVHxWzlQLjmvWmolftc1737022447.png", "https://image.prepladder.com/content/x4xHIYk9KlDgYBVXvg9R1737022470.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:427px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class I</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Minimal Mesangial LN</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class II</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mesangial proliferative LN</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class III (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Focal LN (<50% glomeruli)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class IV</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse LN (>50% glomeruli)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class V (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Membranous LN</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Class VI (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Advanced <span class=\"customMeta\" data-dictid=\"0aa16e71201692777198c4c07e2392\">Sclerosing</span> LN</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with generalised oedema and frothy urine. Laboratory investigations reveal significant proteinuria and hypoalbuminemia. A kidney biopsy reveals diffuse thickening of GBM, a spike and dome pattern on the silver stain and subepithelial deposits on electron microscopy. Which of the following genetic mutations is most likely associated with this condition?", "options": [{"label": "A", "text": "Mutation in PLA2R", "correct": true}, {"label": "B", "text": "Mutation in LAMB2 gene", "correct": false}, {"label": "C", "text": "Mutations in APOL1 gene", "correct": false}, {"label": "D", "text": "Mutations in CFH gene", "correct": false}], "correct_answer": "A. Mutation in PLA2R", "question_images": ["https://image.prepladder.com/content/arfJSJXlEexwfQkkDgVK1737580978.png"], "explanation_images": ["https://image.prepladder.com/content/SY3Kci1oH9ulZYzTQEHC1737581058.png", "https://image.prepladder.com/content/taHoMpnpwuEhBj8pCaTM1737058524.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old female presents with edema, hypertension, significant proteinuria, and hematuria. Kidney biopsy reveals mesangial and endocapillary hypercellularity with mesangial and subendothelial electron-dense deposits, tram track appearance on silver stains and granular staining for IgG and C3 on Immunofluorescence. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Type I Membranoproliferative Glomerulonephritis", "correct": true}, {"label": "B", "text": "Type II Membranoproliferative Glomerulonephritis", "correct": false}, {"label": "C", "text": "Membranous Nephropathy", "correct": false}, {"label": "D", "text": "Focal Segmental Glomerulosclerosis", "correct": false}], "correct_answer": "A. Type I Membranoproliferative Glomerulonephritis", "question_images": ["https://image.prepladder.com/content/3dCErpUqFU9h2nFLe0gw1737027844.png"], "explanation_images": ["https://image.prepladder.com/content/lf22waE9Mphgs56gHCBO1737027885.png", "https://image.prepladder.com/content/mSbRgSxvFpHMqGDC2l6l1737027958.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:691px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Light Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunofluorescence</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type I MPGN</strong></p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mesangial proliferative or membranoproliferative patterns of proliferation; GBM thickening and</p>\n<p>Splitting.</p>\n<p><strong>(Double-contour or tram track appearance)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Subendothelial and mesangial deposits</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IgG ++ C3</strong> (C1q ++ C4 may also present)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type II MPGN (Dense Deposit Disease)</strong></p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dense <span class=\"customMeta\" data-dictid=\"9ab9c0fe2f169277719065b8b974d7\">intramembranous</span> deposits</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C3; no C1q or C4</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Membranous Nephropathy</strong></p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> wall thickening</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Subepithelial deposits</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Granular IgG and C3; diffuse</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Focal <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">Segmental</span> Glomerulosclerosis (FSGS) (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Focal and <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">segmental</span> <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">sclerosis</span> and hyalinosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Effacement of foot processes; epithelial denudation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Focal; IgM + C3 in many cases</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which genetic mutation is responsible for a syndrome of steroid-resistant nephrotic syndrome of childhood onset?", "options": [{"label": "A", "text": "NPHS1", "correct": false}, {"label": "B", "text": "NPHS2", "correct": true}, {"label": "C", "text": "α-actinin 4", "correct": false}, {"label": "D", "text": "TRPC6", "correct": false}], "correct_answer": "B. NPHS2", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old man presents with swelling around his eyes, ankles, and abdomen, along with frothy urine. Urinalysis shows proteinuria, elevated serum creatinine, and BUN levels. Image of renal biopsy is given below. Which of the following is not an established cause of this condition?", "options": [{"label": "A", "text": "Diabetes mellitus", "correct": true}, {"label": "B", "text": "HIV infection", "correct": false}, {"label": "C", "text": "Hypertension", "correct": false}, {"label": "D", "text": "Sickle cell anaemia", "correct": false}], "correct_answer": "A. Diabetes mellitus", "question_images": ["https://image.prepladder.com/content/To9lbXYfCqLVQw5BX7YJ1737025882.png"], "explanation_images": ["https://image.prepladder.com/content/fY8SCFggHS3fglEWhCPd1737025902.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/2qbyCN1kr7OOISYHd6Cv1747671156.mp3", "video": ""}, {"text": "A 6-year-old boy presents with sudden generalised oedema and frothy urine. Urinalysis reveals heavy proteinuria without hematuria. Renal biopsy widespread effacement of podocyte foot processes on electron microscopy. Which of the following is true regarding this condition?", "options": [{"label": "A", "text": "Lipid deposition within glomerular capillaries (tubular cells)", "correct": false}, {"label": "B", "text": "Immunofluorescence microscopy reveals granular deposition of IgG and C3 in the glomeruli.", "correct": false}, {"label": "C", "text": "Good response to corticosteroid therapy", "correct": true}, {"label": "D", "text": "Non-selective proteinuria", "correct": false}], "correct_answer": "C. Good response to corticosteroid therapy", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 7-year-old girl with a recent upper respiratory tract infection presents with generalised swelling and reduced urine output. Urinalysis reveals proteinuria without blood cells or casts. Electron microscopy findings show flattening, retraction, and swelling of podocytes. Which light microscopy findings is characteristic of this condition?", "options": [{"label": "A", "text": "Glomerulosclerosis", "correct": false}, {"label": "B", "text": "Normal glomeruli", "correct": true}, {"label": "C", "text": "Fibrinoid necrosis in glomeruli", "correct": false}, {"label": "D", "text": "Wire looping of capillaries", "correct": false}], "correct_answer": "B. Normal glomeruli", "question_images": ["https://image.prepladder.com/content/WWCw17nB2slSICLwELcj1737024402.png"], "explanation_images": ["https://image.prepladder.com/content/KQERLKhzCxug1uM7xWZz1737024528.png", "https://image.prepladder.com/content/mIuD12kXsgVO1csp81gK1737024590.png", "https://image.prepladder.com/content/c7iEqc7RLq2c8QXPz2Mb1737057742.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 36-year-old woman presents with intermittent flank pain and occasional gross hematuria. Physical examination is unremarkable. Laboratory tests show normal renal function. A renal biopsy of a mass lesion reveals a mixture of mature adipose tissue, thick-walled blood vessels, and bundles of smooth muscle cells. All are true regarding this condition except?", "options": [{"label": "A", "text": "It is commonly associated with tuberous sclerosis.", "correct": false}, {"label": "B", "text": "It is more prevalent in males than females.", "correct": true}, {"label": "C", "text": "It is mostly a benign tumor.", "correct": false}, {"label": "D", "text": "It has a high susceptibility to spontaneous hemorrhage.", "correct": false}], "correct_answer": "B. It is more prevalent in males than females.", "question_images": ["https://image.prepladder.com/content/j6Pzmv1AequK0uOiBf0g1731555394.png"], "explanation_images": ["https://image.prepladder.com/content/Fj9VrBPuv85mtIi4R0Se1731555385.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 15-year-old boy presents with complaints of blurred vision, hearing loss, and recurrent episodes of hematuria. Genetic testing reveals a mutation in Type 4 collagen. Which of the following genetic mutations is observed in the patient?", "options": [{"label": "A", "text": "COL4A3 gene", "correct": false}, {"label": "B", "text": "COL4A4 gene", "correct": false}, {"label": "C", "text": "COL4A5 gene", "correct": false}, {"label": "D", "text": "All of the above", "correct": true}], "correct_answer": "D. All of the above", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old male presents with painless hematuria post-upper respiratory infections, normal vital signs, and no oedema. Urinalysis reveals red blood cell casts and further investigation shows elevated serum creatinine and mild proteinuria. Renal biopsy confirms glomerulonephritis. What is the most common type of glomerulonephritis in this case?", "options": [{"label": "A", "text": "IgA nephropathy", "correct": true}, {"label": "B", "text": "Post-Streptococcal glomerulonephritis", "correct": false}, {"label": "C", "text": "Minimal change disease", "correct": false}, {"label": "D", "text": "Membranous nephropathy", "correct": false}], "correct_answer": "A. IgA nephropathy", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/oUsd6S8BkoMPQTnmLTVP1737023395.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with recurrent hematuria following upper respiratory infections and intermittent proteinuria. Renal biopsy shows mesangial IgA deposits on immunofluorescence and electron-dense deposits in the mesangium on electron microscopy. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Berger’s Disease", "correct": true}, {"label": "B", "text": "Alport syndrome", "correct": false}, {"label": "C", "text": "Membranous nephropathy", "correct": false}, {"label": "D", "text": "Buerger's Disease", "correct": false}], "correct_answer": "A. Berger’s Disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/OCgG5zicYItzQfm9Q7d61737018649.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 30-year-old male presents with increasing shortness of breath and hemoptysis. Lab tests show elevated serum creatinine and hematuria. Renal biopsy reveals linear immunofluorescence along the glomerular basement membrane and subepithelial and intramembranous electron-dense deposits on electron microscopy. Which of the following statements regarding the diagnosis is not true?", "options": [{"label": "A", "text": "It is a Type III hypersensitivity reaction", "correct": true}, {"label": "B", "text": "Defective α3 chain of collagen IV", "correct": false}, {"label": "C", "text": "Linear immunofluorescence is due to IgG deposition", "correct": false}, {"label": "D", "text": "The most common cause of death is uremia.", "correct": false}], "correct_answer": "A. It is a Type III hypersensitivity reaction", "question_images": ["https://image.prepladder.com/content/Oi9bsrgJ6d4C6Hrxni121737018323.png"], "explanation_images": ["https://image.prepladder.com/content/jmFgJgt6BhUnd1bVfmuz1737018336.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 9-year-old boy presents with a recent sore throat, dark urine, fatigue, eye puffiness, and mild limb swelling. Urinalysis reveals hematuria, proteinuria, and red blood cell casts. Serum creatinine levels are slightly elevated. A renal biopsy shows the immunofluorescence image provided below. Which condition is not typically associated with this pattern of rapidly progressive glomerulonephritis?", "options": [{"label": "A", "text": "Wegeners granulomatosis", "correct": true}, {"label": "B", "text": "Henoch-Schonlein purpura", "correct": false}, {"label": "C", "text": "Systemic lupus erythematosus", "correct": false}, {"label": "D", "text": "Ig A Nephropathy", "correct": false}], "correct_answer": "A. Wegeners granulomatosis", "question_images": ["https://image.prepladder.com/content/nHUecbmZFm2isMzzlB1v1737017936.png"], "explanation_images": ["https://image.prepladder.com/content/CE1uedSrlyv0T8OP0a3l1737017963.png", "https://image.prepladder.com/content/6bcF1nWnsazAWgey9d5X1737017947.png", "https://image.prepladder.com/content/8VDJQFhG1H3AlHe8zmSK1737018007.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type I RPGN (Anti-GBM antibody-mediated)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type II RPGN (Immune complex-mediated)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type III RPGN (Pauci-immune) (M/C type)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>Idiopathic</li>\n<li>Goodpasture syndrome</li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>Idiopathic</li>\n<li>Postinfectious glomerulonephritis</li>\n<li><strong>Lupus (SLE) nephritis</strong></li>\n<li><strong>Henoch-Schönlein purpura</strong></li>\n<li><strong>IgA nephropathy</strong></li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>ANCA-associated</li>\n<li>Idiopathic</li>\n<li>Granulomatosis with <span class=\"customMeta\" data-dictid=\"9a6ce977bc1692777196a292871244\">polyangiitis</span> (formerly <strong>Wegener granulomatosis</strong>)</li>\n<li>Microscopic polyangiitis</li>\n</ol>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>Linear/ribbon pattern (Linear <span class=\"customMeta\" data-dictid=\"187169ce3616927771888ae5db3ee0\">GBM</span> deposits of <span class=\"customMeta\" data-dictid=\"2d9b37c62116927771891f3784d2c8\">IgG</span> and C3)</p>\n<br/>\n<img alt=\"\" data-author=\"Dash, Aruna & Fatima, Huma & Grewal, Mandeep & Galphin, Claude & Paueksakon, Paisit\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.researchgate.net/figure/Linear-staining-of-the-glomerular-capillary-wall-for-IgG-anti-IgG-immunofluorescence_fig3_274505083\" data-tags=\"\" height=\"3137\" src=\"https://image.prepladder.com/content/CE1uedSrlyv0T8OP0a3l1737017963.png\" width=\"4167\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>Lumpy Bumpy/ Granular/ Starry Sky/Garland Pattern (granular <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> deposits)</p>\n<br/>\n<img alt=\"\" data-author=\"Al Hussain, Turki & Asiri, Shuaa & Mana, Hadeel & Akhtar, Mohammed\" data-hash=\"\" data-license=\"CC BY-NC SA 4.0\" data-source=\"https://www.researchgate.net/figure/Immunofluorescent-microscopic-pattern-of-staining-for-IgG-in-a-patient-with-immune_fig3_317080802\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/6bcF1nWnsazAWgey9d5X1737017947.png\" width=\"3717\"/></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>No deposits</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron microscopy: </strong><strong>R</strong>PGN causes <strong>R</strong>upture and w<strong>R</strong>inkling of GBM</p>\n<p><img alt=\"\" data-author=\"HIR, MICHEL LE*; KELLER, CORNELIA*; ESCHMANN, VALÉRIE*; HÄHNEL, BRUNHILDE†; HOSSER, HILTRAUDE†; KRIZ, WILHELM†\" data-hash=\"\" data-license=\"PL\" data-source=\"https://journals.lww.com/jasn/fulltext/2001/10000/podocyte_bridges_between_the_tuft_and_bowman_s.7.aspx\" data-tags=\"\" height=\"2633\" src=\"https://image.prepladder.com/content/8VDJQFhG1H3AlHe8zmSK1737018007.png\" width=\"4167\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old woman with a history of SLE presents with fatigue, decreased urine output, and facial swelling. Lab tests show elevated serum creatinine, proteinuria, and hematuria. A renal biopsy is performed, and the histopathological examination image is attached. Which statement is true regarding this condition?", "options": [{"label": "A", "text": "&gt;50% of glomeruli showing crescents is diagnostic.", "correct": true}, {"label": "B", "text": "More the number of crescents, better the prognosis.", "correct": false}, {"label": "C", "text": "Crescents are composed solely of endothelial cells.", "correct": false}, {"label": "D", "text": "Primarily caused by bacterial infections.", "correct": false}], "correct_answer": "A. >50% of glomeruli showing crescents is diagnostic.", "question_images": ["https://image.prepladder.com/content/Oyh5RBBwBCeEWydZNlro1737017519.png"], "explanation_images": ["https://image.prepladder.com/content/DoUu4EBDk3Im9BkiNYEX1737017793.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old boy presents with dark-coloured urine and puffiness around his eyes following a recent sore throat and skin infection. Laboratory tests show elevated serum creatinine, hematuria, and proteinuria. Renal biopsy image is given below. Which condition is most likely associated with these findings?", "options": [{"label": "A", "text": "IgA nephropathy", "correct": false}, {"label": "B", "text": "Membranoproliferative glomerulonephritis", "correct": false}, {"label": "C", "text": "Post-streptococcal glomerulonephritis", "correct": true}, {"label": "D", "text": "Alport syndrome", "correct": false}], "correct_answer": "C. Post-streptococcal glomerulonephritis", "question_images": ["https://image.prepladder.com/content/t6k47bvcT46I9SQ5O6Hk1737570424.png"], "explanation_images": ["https://image.prepladder.com/content/fG7bsMs0u3DrpM6oF5FN1737570441.png", "https://image.prepladder.com/content/RaOQDKRMqSCjvyhN3ZoK1737016858.png", "https://image.prepladder.com/content/ciMhXQOcIDplYecPRDiU1737016893.png", "https://image.prepladder.com/content/zFtOgZuDTEOEqe0VZqVx1737016918.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:656px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathological findings in PSGN</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grossly</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Kidneys appear speckled or <span class=\"customMeta\" data-dictid=\"66f4e1c35716927771929959483274\">mottled</span> due to numerous small haemorrhages <strong>(Flea-bitten appearance).</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Light microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypercellular <span class=\"customMeta\" data-dictid=\"c9bd75ce5f1692777188f7fe800061\">glomeruli</span> </strong>are caused by <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> by leukocytes (neutrophils and monocytes) and the <strong>proliferation of endothelial and mesangial cells.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>‘Subepithelial <span class=\"customMeta\" data-dictid=\"3012715fa81692777187f57c5a2b0e\">electron-dense</span> humps’</strong> due to immune complex deposition beneath the epithelial cells of the <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> basement membrane.</p>\n<p><img alt=\"\" data-author=\"Alejandro Best\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.arkanalabs.com/subepithelial-humps/\" data-tags=\"\" height=\"388\" src=\"https://image.prepladder.com/content/fG7bsMs0u3DrpM6oF5FN1737570441.png\" width=\"500\"/></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunofluorescence</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Characteristic<strong> 'Starry sky appearance' </strong>by immune complex deposition.</p>\n<p> </p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Condition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Findings in microscopy</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IgA </strong><strong>Nephropathy (Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mesangial deposition of IgA</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Membranoproliferative <span class=\"customMeta\" data-dictid=\"d3658e1af116927771887bc5b8a57e\">glomerulonephritis</span> (Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mesangial & <span class=\"customMeta\" data-dictid=\"debc628674169277719936b6424a58\">subendothelial</span> immune deposits are seen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alport Syndrome (Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Basket Weave Appearance of GBM</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old patient presents with complaints of frothy urine, as shown below, and severe generalised oedema. On physical examination, there is marked swelling in the legs and abdomen. Laboratory tests reveal significant proteinuria (3+ on dipstick) and hypoalbuminemia. Which of the following findings can be typically observed in this patient?", "options": [{"label": "A", "text": "Azotemia", "correct": false}, {"label": "B", "text": "Hyperlipidemia", "correct": true}, {"label": "C", "text": "Red cell casts in the urine", "correct": false}, {"label": "D", "text": "Hypertension", "correct": false}], "correct_answer": "B. Hyperlipidemia", "question_images": ["https://image.prepladder.com/content/q6rgaR6U4im9ySRl7P1H1737630351.png"], "explanation_images": ["https://image.prepladder.com/content/7MNOgGdXItmHqWouM1oY1737630589.png", "https://image.prepladder.com/content/qCewFMgTHvoc6wGlFgDe1737630458.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:711px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nephritic Syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nephrotic Syndrome</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Inflammation of glomeruli</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased <span class=\"customMeta\" data-dictid=\"1c7103a9b516927771955682b6aaa4\">permeability</span> of <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> basement membrane</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Proteinuria</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild to moderate (< 1 g/day)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe (> 3.5 g/day)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hematuria</strong><strong> </strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Present (visible blood in <span class=\"customMeta\" data-dictid=\"0096f2a7631692777201eb9f21d5a7\">urine</span> or <span class=\"customMeta\" data-dictid=\"79067cb33316927771926965c3c0b5\">microscopic</span> hematuria)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Absent or very minimal</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Edema</strong><strong> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild, usually in the face and eyes</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe, generalised (anasarca)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Blood Pressure</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Elevated <strong>(Hypertension)</strong> <strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal or slightly elevated</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serum Albumin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Slightly decreased or normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Markedly decreased (hypoalbuminemia)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lipid Levels</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal or slightly elevated</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hyperlipidemia (Option B)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Renal Function</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Often <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> <strong>(Azotemia)</strong> <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Usually normal or slightly impaired</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Urine findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Red cell casts</strong> <strong>(Option C), </strong>granular casts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Fatty casts, <span class=\"customMeta\" data-dictid=\"74793d564816927771943ae4ba74b3\">oval</span> fat bodies & Maltese cross appearance (lipiduria)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Common Causes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Post-streptococcal glomerulonephritis</li>\n<li>IgA nephropathy</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Minimal change disease</li>\n<li>Membranous nephropathy</li>\n<li>Focal <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">segmental</span> glomerulosclerosis</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><strong>Symptoms</strong></td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Oliguria, <span class=\"customMeta\" data-dictid=\"660645b0c91692777188bbdf3fedff\">hematuria</span> (cola-colour urine), hypertension, thrombotic events (Loss of AT III via urine)</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"James Heilman, MD\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Myoglobinuria#/media/File:RhabdoUrine.JPG\" data-tags=\"\" height=\"749\" src=\"https://image.prepladder.com/content/7MNOgGdXItmHqWouM1oY1737630589.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Frothy urine, severe oedema</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Márcio Dantas Gyl Eanes Barros-Silva Miguel Moyses Neto\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.researchgate.net/publication/275123441_Foamy_urine_in_nephrotic_syndrome\" data-tags=\"\" height=\"629\" src=\"https://image.prepladder.com/content/qCewFMgTHvoc6wGlFgDe1737630458.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 28 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A patient presents with a cerebellar mass and a renal tumor, along with a similar family history. Which of the following is responsible for his findings?", "options": [{"label": "A", "text": "VHL", "correct": true}, {"label": "B", "text": "NF", "correct": false}, {"label": "C", "text": "TSC", "correct": false}, {"label": "D", "text": "Li Fraumeni syndrome", "correct": false}], "correct_answer": "A. VHL", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A – VHL\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Most characteristic finding of diabetic nephropathy?", "options": [{"label": "A", "text": "Kimmelstein Wilson disease", "correct": true}, {"label": "B", "text": "Diffuse glomerulosclerosis", "correct": false}, {"label": "C", "text": "Focal segmental glomerulosclerosis", "correct": false}, {"label": "D", "text": "Armani Ebstein change", "correct": false}], "correct_answer": "A. Kimmelstein Wilson disease", "question_images": [], "explanation_images": [], "explanation": "<p>CorrectOption A.\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old man has been diagnosed with solid cancer of the bowel. He also experienced massive proteinuria a few months after the initial diagnosis of cancer. What do you think is the likely cause of the development of urinary findings?", "options": [{"label": "A", "text": "Membranous nephropathy", "correct": true}, {"label": "B", "text": "Focal segmental glomerulosclerosis", "correct": false}, {"label": "C", "text": "Membranoproliferative glomerulonephritis", "correct": false}, {"label": "D", "text": "Dense deposit disease", "correct": false}], "correct_answer": "A. Membranous nephropathy", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/JIWHYRBgR0ukqwnJ4Dh11746697332.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Characteristic Features of Membranous Nephropathy</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Feature</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary Cause</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autoantibodies against <strong>phospholipase A2 <span class=\"customMeta\" data-dictid=\"9e4959f6f316927771978bb152d440\">receptor</span> (PLA2R)</strong> on podocytes (most common in <span class=\"customMeta\" data-dictid=\"4acddc3cf5169277718996440e2e14\">idiopathic</span> cases).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Secondary Causes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Autoimmune diseases (SLE), infections (Hepatitis B/C), drugs (NSAIDs, penicillamine), and malignancies (lung, breast, <span class=\"customMeta\" data-dictid=\"0fce15e71f1692777184feb9af5303\">colon</span> cancer).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nephrotic Syndrome Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Massive <span class=\"customMeta\" data-dictid=\"1f58deccf71692777196e64781a01a\">proteinuria</span> (>3.5 g/day), hypoalbuminemia, oedema, hyperlipidemia, lipiduria.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Risk of Thrombosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Renal <span class=\"customMeta\" data-dictid=\"75ddd4cc7016927772012e0acd424d\">vein</span> thrombosis</strong> is a known complication.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Light Microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diffuse thickening of the <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> basement <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> (GBM)</strong> without hypercellularity.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron Microscopy (EM)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Subepithelial immune deposits</strong> create a <strong>\"spike and dome\" appearance</strong>.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunofluorescence</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Granular IgG and C3 deposits</strong> along the GBM.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PLA2R Antibodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Specific for primary membranous nephropathy</strong> and helps <span class=\"customMeta\" data-dictid=\"c9001edbf216927771860f3475b44c\">differentiate</span> from secondary causes.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>ACE inhibitors/ARBs (reduce proteinuria), steroids + immunosuppressants (cyclophosphamide, rituximab) for severe cases.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>⅓ <span class=\"customMeta\" data-dictid=\"f71e485d131692777199151d1076d2\">spontaneous</span> remission, ⅓ persistent proteinuria, ⅓ progress to ESRD.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Effacement of podocyte foot processes is seen in which of the following diseases?", "options": [{"label": "A", "text": "Steroid-resistant glomerulonephritis", "correct": false}, {"label": "B", "text": "Minimal change disease", "correct": true}, {"label": "C", "text": "Rapidly progressive glomerulonephritis", "correct": false}, {"label": "D", "text": "Chronic glomerulonephritis", "correct": false}], "correct_answer": "B. Minimal change disease", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/I4CmtyCUfQcBjylPleUC1746518078.png", "https://image.prepladder.com/content/9pzFqBvf4NmJvdvm7tbi1746518094.png", "https://image.prepladder.com/content/MZBEHjufhTZPJWfMhXYT1746518127.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 51-year-old male patient presents with complaints of hematuria. On examination, he is normotensive and has pedal edema. Investigations reveal that the patient has no glycosuria and a creatinine level of 9. His renal biopsy finding is given below. Which of the following investigations should be done to identify the disease?", "options": [{"label": "A", "text": "ANA", "correct": false}, {"label": "B", "text": "Anti-GBM antibodies", "correct": true}, {"label": "C", "text": "HIV RNA", "correct": false}, {"label": "D", "text": "Urine immunoelectrophoresis", "correct": false}], "correct_answer": "B. Anti-GBM antibodies", "question_images": ["https://image.prepladder.com/content/TNh2fLAoC7bW1GlY2pjA1745217920.png"], "explanation_images": ["https://image.prepladder.com/notes/EbWjNuzfVZj1epUUM2Tf1746437456.png", "https://image.prepladder.com/notes/iBxNMbfhIyjufWK8M2BK1746437585.png", "https://image.prepladder.com/notes/l1BZ6VvgSNftfIVZEpg11746437697.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:719px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type I RPGN </strong></p>\n<p><strong>(Anti-GBM Ab-mediated)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type II RPGN </strong></p>\n<p><strong>(Immune complex-mediated)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type III RPGN (Pauci-immune) (M/C type)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>Idiopathic</li>\n<li>Goodpasture syndrome</li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>Idiopathic</li>\n<li>Postinfectious glomerulonephritis</li>\n<li><strong>Lupus (SLE) <span class=\"customMeta\" data-dictid=\"d4d4bbdd341692777193b705a75667\">nephritis</span> </strong></li>\n<li><strong>Henoch-Schönlein purpura</strong></li>\n<li><strong>IgA nephropathy</strong></li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>ANCA-associated</li>\n<li>Idiopathic</li>\n<li>Granulomatosis with <span class=\"customMeta\" data-dictid=\"9a6ce977bc1692777196a292871244\">polyangiitis</span> (formerly <strong>Wegener granulomatosis</strong>)</li>\n<li>Microscopic polyangiitis</li>\n</ol>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>Linear/ribbon pattern (Linear GBM deposits of IgG and C3)<br/>\n\t\t\t </p>\n<p> </p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"PA576\" data-author=\"Dash, Aruna & Fatima, Huma & Grewal, Mandeep & Galphin, Claude & Paueksakon, Paisit\" data-hash=\"11855\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.researchgate.net/figure/Linear-staining-of-the-glomerular-capillary-wall-for-IgG-anti-IgG-immunofluorescence_fig3_274505083\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/EbWjNuzfVZj1epUUM2Tf1746437456.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>Lumpy Bumpy/ Granular/ Starry Sky/Garland Pattern (granular <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> deposits)</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"PA575\" data-author=\"Al Hussain, Turki & Asiri, Shuaa & Mana, Hadeel & Akhtar, Mohammed\" data-hash=\"11856\" data-license=\"CC BY-NC SA 4.0\" data-source=\"https://www.researchgate.net/figure/Immunofluorescent-microscopic-pattern-of-staining-for-IgG-in-a-patient-with-immune_fig3_317080802\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/iBxNMbfhIyjufWK8M2BK1746437585.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>No deposits</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Electron microscopy: R</strong>PGN causes <strong>R</strong>upture and w<strong>R</strong>inkling of GBM</p>\n<figure class=\"caption_element\"><img alt=\"PA577\" data-author=\"HIR, MICHEL LE*; KELLER, CORNELIA*; ESCHMANN, VALÉRIE*; HÄHNEL, BRUNHILDE†; HOSSER, HILTRAUDE†; KRIZ, WILHELM†\" data-hash=\"11857\" data-license=\"PL\" data-source=\"https://journals.lww.com/jasn/fulltext/2001/10000/podocyte_bridges_between_the_tuft_and_bowman_s.7.aspx\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/l1BZ6VvgSNftfIVZEpg11746437697.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Membranoproliferative glomerulonephritis is seen in which of the following conditions? HIV SLE CLL Hepatitis B", "options": [{"label": "A", "text": "1, 2, 3", "correct": false}, {"label": "B", "text": "1, 2, 3, 4", "correct": true}, {"label": "C", "text": "2, 3, 4", "correct": false}, {"label": "D", "text": "1, 2", "correct": false}], "correct_answer": "B. 1, 2, 3, 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/l9oLSGGKMPJubF4II2tu1745840114.png", "https://image.prepladder.com/content/GjMlAQs2PvIvU3hqUNxZ1745840126.png", "https://image.prepladder.com/content/Y0VCTcfv43Dq7IrPbwoV1745840135.png", "https://image.prepladder.com/content/2J63NjVJan1rlHc1szba1745840148.png", "https://image.prepladder.com/content/yJNoevKaAQcyGXYPyWhb1745840162.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Pathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Light Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Electron Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Immunofluorescence</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type I MPGN</strong></p>\n</td>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mesangial proliferative or membranoproliferative patterns of proliferation; GBM thickening and Splitting.</p>\n<p><strong>(Double-contour or tram track appearance). </strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Membranoproliferative_glomerulonephritis#/media/File:Membranoproliferative_glomerulonephritis_-_very_high_mag.jpg\" data-tags=\"\" height=\"243\" src=\"https://image.prepladder.com/content/l9oLSGGKMPJubF4II2tu1745840114.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Subendothelial and mesangial deposits.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Tsalouchos, Aris.\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/Pathology-of-membranoproliferative-glomerulonephritis-MPGN-type-I-A-Light-microscopy_fig4_315516592\" data-tags=\"\" height=\"265\" src=\"https://image.prepladder.com/content/GjMlAQs2PvIvU3hqUNxZ1745840126.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IgG ++ C3 (C1q ++ C4 may also present)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type II MPGN (Dense Deposit Disease)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dense <span class=\"customMeta\" data-dictid=\"9ab9c0fe2f169277719065b8b974d7\">intramembranous</span> deposits.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C3; no C1q or C4</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Membranous Nephropathy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> wall thickening.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Membranous_nephropathy_-_pas_-_very_high_mag.jpg\" data-tags=\"\" height=\"238\" src=\"https://image.prepladder.com/content/Y0VCTcfv43Dq7IrPbwoV1745840135.png\" width=\"362\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Subepithelial deposits.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Majoni, Sandawana & Smith, Steven.\" data-hash=\"\" data-license=\"CC BY 2.0\" data-source=\"https://www.researchgate.net/figure/Stage-3-membranous-glomerulonephritis-with-medium-sized-subepithelial-dense-deposits-and_fig1_23316223\" data-tags=\"\" height=\"256\" src=\"https://image.prepladder.com/content/2J63NjVJan1rlHc1szba1745840148.png\" width=\"330\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Granular IgG and C3; diffuse</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Focal <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">Segmental</span> Glomerulosclerosis (FSGS) </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Focal and <span class=\"customMeta\" data-dictid=\"6c572343621692777198867cf8d853\">segmental</span> <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">sclerosis</span> and hyalinosis.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://en.wikipedia.org/wiki/Focal_segmental_glomerulosclerosis#/media/File:Focal_segmental_glomerulosclerosis_-_high_mag.jpg\" data-tags=\"\" height=\"244\" src=\"https://image.prepladder.com/content/yJNoevKaAQcyGXYPyWhb1745840162.png\" width=\"362\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Effacement of foot processes; epithelial denudation.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Focal; IgM + C3 in many cases</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What type of urinary casts would you expect in a patient diagnosed with Fabry’s disease?", "options": [{"label": "A", "text": "Waxy cast", "correct": false}, {"label": "B", "text": "RBC cast", "correct": false}, {"label": "C", "text": "WBC cast", "correct": false}, {"label": "D", "text": "Maltese cross cast", "correct": true}], "correct_answer": "D. Maltese cross cast", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/rYk7UDjoJgsEokP5eMV61745836320.png", "https://image.prepladder.com/content/aM2k1jI5Mi3oVLeIoDeq1745836335.png", "https://image.prepladder.com/content/ohP2cjtSLYKHwQfCtga01745836344.png", "https://image.prepladder.com/content/khL5nBXy01CZodKyG6pz1745836353.png", "https://image.prepladder.com/content/lMnQANoQoofm44QWBAaB1745836364.png", "https://image.prepladder.com/content/yga35np25zq0fMTk3yl81745836374.png", "https://image.prepladder.com/content/t3c7LeNw3NtydoNOD3BB1745836384.png", "https://image.prepladder.com/content/w5QAK5r6u0cMgwzj1bso1745836393.png", "https://image.prepladder.com/content/ulz1Bf1wYXTPuti5mz181745836404.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Renal Cast Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Condition Associated</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:bottom\">\n<p style=\"text-align:center\"><strong>Images</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Hyaline casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Normal conditions, Fever, Pregnancy</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Ajay Kumar Chaurasiya,\" data-hash=\"\" data-license=\"CC BY-SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Hyaline_Cast_in_Urine_Microscopy.jpg\" data-tags=\"\" height=\"242\" src=\"https://image.prepladder.com/content/aM2k1jI5Mi3oVLeIoDeq1745836335.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Muddy Brown casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Acute <span class=\"customMeta\" data-dictid=\"98d387b7bd1692777201278b27be72\">tubular</span> necrosis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mohsenin V\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://en.wikipedia.org/wiki/Urinalysis#/media/File:RTE_cast,_muddy_granular_cast,_WBC_cast_and_RBC_cast_in_urine.jpg\" data-tags=\"\" height=\"221\" src=\"https://image.prepladder.com/content/ohP2cjtSLYKHwQfCtga01745836344.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Waxy casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> failure</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Tracy Stokol \" data-hash=\"\" data-license=\"CC BY NC SA 4.0\" data-source=\"https://eclinpath.com/urinalysis/cellular-constituents/waxycomp1/\" data-tags=\"\" height=\"169\" src=\"https://image.prepladder.com/content/khL5nBXy01CZodKyG6pz1745836353.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Fatty casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Nephrotic syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Ajay Kumar Chaurasiya\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Fatty_cast_in_urine.jpg\" data-tags=\"\" height=\"338\" src=\"https://image.prepladder.com/content/lMnQANoQoofm44QWBAaB1745836364.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>RBC casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Glomerulonephritis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mohsenin V.\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:RTE_cast,_muddy_granular_cast,_WBC_cast_and_RBC_cast_in_urine.jpg\" data-tags=\"\" height=\"198\" src=\"https://image.prepladder.com/content/yga35np25zq0fMTk3yl81745836374.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>WBC casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Pyelonephritis, <span class=\"customMeta\" data-dictid=\"f46ba26d111692777190def3b1d80a\">interstitial</span> nephritis</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Ajay Kumar Chaurasiya\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:WBC_cast_in_urine.jpg\" data-tags=\"\" height=\"295\" src=\"https://image.prepladder.com/content/t3c7LeNw3NtydoNOD3BB1745836384.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Epithelial casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Renal epithelial injury</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\" Ajay Kumar Chaurasiya\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.m.wikimedia.org/wiki/File:Epithelial_cell_cast.jpg\" data-tags=\"\" height=\"239\" src=\"https://image.prepladder.com/content/w5QAK5r6u0cMgwzj1bso1745836393.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p><strong>Broad casts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<p>Chronic <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> disease</p>\n</td>\n<td style=\"border-bottom:1px solid #0d0d0d; border-left:1px solid #0d0d0d; border-right:1px solid #0d0d0d; border-top:1px solid #0d0d0d; vertical-align:middle\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"https://webpath.med.utah.edu/TUTORIAL/URINE/URIN074.html\" data-tags=\"\" height=\"212\" src=\"https://image.prepladder.com/content/ulz1Bf1wYXTPuti5mz181745836404.png\" width=\"320\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most characteristic feature of diabetic nephropathy, which is shown below?", "options": [{"label": "A", "text": "Kimmelstiel Wilson nodules", "correct": true}, {"label": "B", "text": "Armanni Ebstein change", "correct": false}, {"label": "C", "text": "Aschoff nodule", "correct": false}, {"label": "D", "text": "Anitschkow cell", "correct": false}], "correct_answer": "A. Kimmelstiel Wilson nodules", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/FSI0PV7i67gctdpkID0S1747908773.png", "https://image.prepladder.com/notes/h561qiLnwi8H9pmexAiP1747908839.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements is/are true regarding clear cell carcinoma of the kidney? Most common primary renal malignancy Associated with the loss of the short arm of chromosome 3 Not associated with paraneoplastic syndrome The classic triad of flank pain, palpable mass, and hematuria is seen.", "options": [{"label": "A", "text": "1, 2, 4", "correct": true}, {"label": "B", "text": "2, 3", "correct": false}, {"label": "C", "text": "1, 3", "correct": false}, {"label": "D", "text": "1, 4", "correct": false}], "correct_answer": "A. 1, 2, 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/fKQQxQtJUqfBNfAkKyVz1746691049.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Tamm-Horsfall protein is a major component of which of the following?", "options": [{"label": "A", "text": "Mural thrombi", "correct": false}, {"label": "B", "text": "Curschmann spirals", "correct": false}, {"label": "C", "text": "Renal casts", "correct": true}, {"label": "D", "text": "Bence-Jones proteins", "correct": false}], "correct_answer": "C. Renal casts", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 48-year-old man presents with facial puffiness, frothy urine, hypertension, a history of hepatitis B infection, and microscopic hematuria. A kidney biopsy reveals a spike and dome pattern. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Minimal change disease", "correct": false}, {"label": "B", "text": "Membranous nephropathy", "correct": true}, {"label": "C", "text": "Focal segmental glomerulosclerosis", "correct": false}, {"label": "D", "text": "PSGN-associated disease", "correct": false}], "correct_answer": "B. Membranous nephropathy", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ooaVY9vsrr0ahCxeSF4z1745314676.png", "https://image.prepladder.com/content/PN4FDF4TLypIjPLolBcH1745314685.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Pathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Light Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Electron Microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Immunofluorescence</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Membranous Nephropathy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\">Diffuse <span class=\"customMeta\" data-dictid=\"89e3252d5b16927771833fb9b432ae\">capillary</span> wall thickening</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\">Subepithelial deposits</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\">Granular <span class=\"customMeta\" data-dictid=\"2d9b37c62116927771891f3784d2c8\">IgG</span> and C3; diffuse</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A pediatric patient presents with cola-coloured urine, high blood pressure, and periorbital oedema. Laboratory tests reveal a creatinine level of 2.5 mg/dL, which rises to 4.5 mg/dL after 3 weeks despite treatment. What electron microscopic finding is most likely in this patient?", "options": [{"label": "A", "text": "Subendothelial deposits", "correct": false}, {"label": "B", "text": "Subepithelial deposits", "correct": true}, {"label": "C", "text": "Crescent formation", "correct": false}, {"label": "D", "text": "Mesangial deposits", "correct": false}], "correct_answer": "B. Subepithelial deposits", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tEFf36NXnWnVApss1hOF1745314316.png", "https://image.prepladder.com/content/XVlIPEnuB38Fwdx1XP731745314325.png", "https://image.prepladder.com/content/QlIFDeeVWpJC4UWW3htJ1745314334.png", "https://image.prepladder.com/content/uF28BIbk39zlqGDNbK1C1745314342.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Pathological findings in PSGN</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grossly</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Kidneys appear speckled or <span class=\"customMeta\" data-dictid=\"66f4e1c35716927771929959483274\">mottled</span> due to numerous small haemorrhages <strong>(Flea-bitten appearance)</strong>.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Y. EroksuzM. DabakH. EroksuzE. BaydarI. TurkogluI. Yılmaz\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.semanticscholar.org/paper/Acute-oak-%28-Quercus-infectoria-%29-toxicosis-in-lambs-Eroksuz-Dabak/c5ab82a2c4fec864d015d83681eb6dda8f560591/figure/2\" data-tags=\"\" height=\"300\" src=\"https://image.prepladder.com/content/tEFf36NXnWnVApss1hOF1745314316.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Light microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypercellular <span class=\"customMeta\" data-dictid=\"c9bd75ce5f1692777188f7fe800061\">glomeruli</span> </strong>are caused by <span class=\"customMeta\" data-dictid=\"669bdcb3111692777190e018ae930e\">infiltration</span> by leukocytes (neutrophils and monocytes) and the<strong> </strong><strong>proliferation of endothelial and mesangial cells</strong><strong>. </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron microscope</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>‘Subepithelial <span class=\"customMeta\" data-dictid=\"3012715fa81692777187f57c5a2b0e\">electron-dense</span> humps’</strong><strong> </strong>due to immune complex deposition beneath the epithelial cells of the <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> basement membrane.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Alejandro Best\" data-hash=\"\" data-license=\"NA\" data-source=\"https://www.arkanalabs.com/subepithelial-humps/\" data-tags=\"\" height=\"311\" src=\"https://image.prepladder.com/content/XVlIPEnuB38Fwdx1XP731745314325.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunofluorescence</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Characteristic <strong>'Starry sky appearance'</strong><strong> </strong> by immune complex deposition.</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Khalighi, Mazdak & Wang, Shihtien & Henriksen, Kammi & Bock, Margret & Keswani, Mahima & Meehan, Shane & Chang, Anthony.\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.researchgate.net/publication/303363829_Revisiting_post-infectious_glomerulonephritis_in_the_emerging_era_of_C3_glomerulopathy?_tp=eyJjb250ZXh0Ijp7ImZpcnN0UGFnZSI6Il9kaXJlY3QiLCJwYWdlIjoiX2RpcmVjdCJ9fQ\" data-tags=\"\" height=\"241\" src=\"https://image.prepladder.com/content/QlIFDeeVWpJC4UWW3htJ1745314334.png\" width=\"500\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following will increase in size on electrophoresis in Nephrotic syndrome?", "options": [{"label": "A", "text": "Gamma globulin", "correct": false}, {"label": "B", "text": "Alpha 2 globulin", "correct": true}, {"label": "C", "text": "Beta globulin", "correct": false}, {"label": "D", "text": "Albumin", "correct": false}], "correct_answer": "B. Alpha 2 globulin", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/oPis1SMY8d1NoLAXyEqk1745925929.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 47-year-old male with 400 ml urine output per 24 hrs. On histology, he had RPGN with Pauci immune glomerulonephritis with crescents. What is the main etiology?", "options": [{"label": "A", "text": "Anti GBM", "correct": false}, {"label": "B", "text": "ANCA", "correct": true}, {"label": "C", "text": "Anti PLA2R", "correct": false}, {"label": "D", "text": "ANA", "correct": false}], "correct_answer": "B. ANCA", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/g3UDE4xaQbnqcH4x4rZN1744972069.png", "https://image.prepladder.com/content/KtLgK4IHwaUu8kl3Rfo31744972069.png", "https://image.prepladder.com/content/jlpBHWU4yqJX6iFlbTKh1745925700.png", "https://image.prepladder.com/content/37aVc4zwuGRIEx5uOVoL1745925722.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:708px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type I RPGN (Anti-GBM antibody-mediated)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type II RPGN (Immune complex-mediated)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Type III RPGN (Pauci-immune) (M/C type)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>Idiopathic</li>\n<li>Goodpasture syndrome- the presence of <span class=\"customMeta\" data-dictid=\"4665fdd0a0169277718100f58eb0d5\">Anti</span> GBM. <strong>(Option A ruled out)</strong></li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>Idiopathic</li>\n<li>Postinfectious glomerulonephritis</li>\n<li>Lupus (SLE) <span class=\"customMeta\" data-dictid=\"d4d4bbdd341692777193b705a75667\">nephritis</span> - <span class=\"customMeta\" data-dictid=\"a0db54ebbf1692777181d7ff70d047\">ANA</span> positive <strong>(Option D ruled out)</strong></li>\n<li>Henoch-Schönlein purpura</li>\n<li>IgA nephropathy</li>\n</ol>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Includes:</strong></p>\n<ol>\n<li>ANCA-associated</li>\n<li>Idiopathic</li>\n<li>Granulomatosis with <span class=\"customMeta\" data-dictid=\"9a6ce977bc1692777196a292871244\">polyangiitis</span> (formerly <strong>Wegener granulomatosis</strong>)</li>\n<li>Microscopic polyangiitis</li>\n</ol>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>Linear/ribbon pattern (Linear <span class=\"customMeta\" data-dictid=\"187169ce3616927771888ae5db3ee0\">GBM</span> deposits of <span class=\"customMeta\" data-dictid=\"2d9b37c62116927771891f3784d2c8\">IgG</span> and C3)</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Dash, Aruna & Fatima, Huma & Grewal, Mandeep & Galphin, Claude & Paueksakon, Paisit\" data-hash=\"\" data-license=\"CC BY NC 4.0\" data-source=\"https://www.researchgate.net/figure/Linear-staining-of-the-glomerular-capillary-wall-for-IgG-anti-IgG-immunofluorescence_fig3_274505083\" data-tags=\"\" height=\"162\" src=\"https://image.prepladder.com/content/g3UDE4xaQbnqcH4x4rZN1744972069.png\" width=\"215\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>Lumpy Bumpy/ Granular/ Starry Sky/Garland Pattern (granular <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> deposits)</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Al Hussain, Turki & Asiri, Shuaa & Mana, Hadeel & Akhtar, Mohammed\" data-hash=\"\" data-license=\"CC BY-NC SA 4.0\" data-source=\"https://www.researchgate.net/figure/Immunofluorescent-microscopic-pattern-of-staining-for-IgG-in-a-patient-with-immune_fig3_317080802\" data-tags=\"\" height=\"190\" src=\"https://image.prepladder.com/content/KtLgK4IHwaUu8kl3Rfo31744972069.png\" width=\"239\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>IF finding:</strong></p>\n<p>No deposits</p>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Electron microscopy: R</strong>PGN causes <strong>R</strong>upture and w<strong>R</strong>inkling of GBM</p>\n<p> </p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"HIR, MICHEL LE*; KELLER, CORNELIA*; ESCHMANN, VALÉRIE*; HÄHNEL, BRUNHILDE†; HOSSER, HILTRAUDE†; KRIZ, WILHELM†\" data-hash=\"\" data-license=\"PL\" data-source=\"https://journals.lww.com/jasn/fulltext/2001/10000/podocyte_bridges_between_the_tuft_and_bowman_s.7.aspx\" data-tags=\"\" height=\"2633\" src=\"https://image.prepladder.com/content/jlpBHWU4yqJX6iFlbTKh1745925700.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis for a 9-year-old boy who presents with hematuria, hypertension, facial puffiness for 3 days, and a recent history of throat infection two weeks ago, with urine examination showing albumin positivity?", "options": [{"label": "A", "text": "Group B beta-hemolytic streptococci", "correct": false}, {"label": "B", "text": "Staphylococcus aureus", "correct": false}, {"label": "C", "text": "Group A beta-hemolytic streptococci", "correct": true}, {"label": "D", "text": "Staphylococcus epidermidis", "correct": false}], "correct_answer": "C. Group A beta-hemolytic streptococci", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Group A beta-h\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with hematuria and flank pain. A renal mass is shown in the image provided. What is the likely diagnosis?", "options": [{"label": "A", "text": "Clear cell carcinoma", "correct": false}, {"label": "B", "text": "Papillary renal cell carcinoma", "correct": false}, {"label": "C", "text": "Chromophobe renal cell carcinoma", "correct": true}, {"label": "D", "text": "Bellini duct carcinoma", "correct": false}], "correct_answer": "C. Chromophobe renal cell carcinoma", "question_images": ["https://image.prepladder.com/content/Ld0HHfbL2NgU0hEmdINE1724851374.png"], "explanation_images": [], "explanation": "<p>Correct Option C - <span class=\"customMeta\" data-dictid=\"cbc547b67e169277718420dd29912f\">Chromophobe</span> <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A female presents to the OPD with complaints of dysuria. Based on the microscopic examination, what is the most likely diagnosis?", "options": [{"label": "A", "text": "HSV", "correct": true}, {"label": "B", "text": "CMV", "correct": false}, {"label": "C", "text": "HPV", "correct": false}, {"label": "D", "text": "Trichomonas", "correct": false}], "correct_answer": "A. HSV", "question_images": ["https://image.prepladder.com/content/YfiQb9Ri7WRxaAhOduql1724914985.png"], "explanation_images": [], "explanation": "<p>Correct Option A – HSV\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Maltese cross crystals in the urine are seen in which of the following diseases other than nephrotic syndrome?", "options": [{"label": "A", "text": "Friedreich’s ataxia", "correct": false}, {"label": "B", "text": "Felty syndrome", "correct": false}, {"label": "C", "text": "Fanconi anaemia", "correct": false}, {"label": "D", "text": "Fabry’s disease", "correct": true}], "correct_answer": "D. Fabry’s disease", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Fabry’\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of these is nephritic syndrome?", "options": [{"label": "A", "text": "Minimal change disease", "correct": false}, {"label": "B", "text": "Membranous glomerulopathy", "correct": false}, {"label": "C", "text": "Post-infectious glomerulonephritis", "correct": true}, {"label": "D", "text": "Focal segmental glomerulosclerosis", "correct": false}], "correct_answer": "C. Post-infectious glomerulonephritis", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Post-infectious glomeruloneph\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old mal e patient who presented with scrotal swelling underwent an orchidectomy. The image below shows the histopathology findings . What is your diagnosis?", "options": [{"label": "A", "text": "Seminoma", "correct": true}, {"label": "B", "text": "Yolk-sac tumor", "correct": false}, {"label": "C", "text": "Embryonal cell carcinoma", "correct": false}, {"label": "D", "text": "Teratoma", "correct": false}], "correct_answer": "A. Seminoma", "question_images": ["https://image.prepladder.com/content/2cSSQrm86FKrKYDmwTE11691498278.png"], "explanation_images": [], "explanation": "<p>Correct Option A - S\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The most consistent and persistent feature of bladder carcinoma is:", "options": [{"label": "A", "text": "Painless hematuria", "correct": true}, {"label": "B", "text": "Painful hematuria", "correct": false}, {"label": "C", "text": "Dysuria", "correct": false}, {"label": "D", "text": "Suprapubic mass", "correct": false}], "correct_answer": "A. Painless hematuria", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Painless hematu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The most characteristic feature of diabetic nephropathy, which is shown below, is?", "options": [{"label": "A", "text": "Kimmelstiel Wilson nodules", "correct": true}, {"label": "B", "text": "Armanni Ebstein change", "correct": false}, {"label": "C", "text": "Aschoff nodule", "correct": false}, {"label": "D", "text": "Anitschkow cell", "correct": false}], "correct_answer": "A. Kimmelstiel Wilson nodules", "question_images": ["https://image.prepladder.com/content/FYFcYlnwhsfzNCql3rRW1713769281.png"], "explanation_images": [], "explanation": "<p>Correct Option A - Kimmelstiel Wilson Nodu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the most likely diagnosis based on the given serum electrophoresis image?", "options": [{"label": "A", "text": "Multiple myeloma", "correct": false}, {"label": "B", "text": "Tuberculosis", "correct": false}, {"label": "C", "text": "Hepatic cirrhosis", "correct": false}, {"label": "D", "text": "Nephrotic syndrome", "correct": true}], "correct_answer": "D. Nephrotic syndrome", "question_images": ["https://image.prepladder.com/content/NIenCLQJhgqm1Ont2qep1693206982.png"], "explanation_images": ["https://image.prepladder.com/content/TafuY61fKOvfHnS6ch9J1693207015.png", "https://image.prepladder.com/content/TafuY61fKOvfHnS6ch9J1693207015.png"], "explanation": "<p>Correct Option D - <span class=\"customMeta\" data-dictid=\"7063996c3816927771930f70c92eb4\">Nephrotic</span> S\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A middle-aged male patient has proteinuria . Looking at the immunofluorescence image below , what is the diagnosis ?", "options": [{"label": "A", "text": "Focal segmental glomerulosclerosis (FSGS)", "correct": false}, {"label": "B", "text": "Post-streptococcal glomerulonephritis (PSGN)", "correct": false}, {"label": "C", "text": "Good pasture syndrome", "correct": false}, {"label": "D", "text": "Lupus nephritis", "correct": true}], "correct_answer": "D. Lupus nephritis", "question_images": ["https://image.prepladder.com/content/iR7SOh3T8QqGu9V3g8Ka1691495558.png"], "explanation_images": [], "explanation": "<p>Correct Option D - <span class=\"customMeta\" data-dictid=\"ccd536a9071692777191f53538ca30\">Lupus</span> Neph\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td> </td>\n<td><strong>Immunofluorescence finding</strong></td>\n</tr>\n<tr>\n<td><strong>Lupus nephritis</strong></td>\n<td>Granular deposits of IgG, IgA, IgM, C3, and <span class=\"customMeta\" data-dictid=\"dc4b0cad251692777183134f1e749b\">C1q</span> throughout the glomeruli</td>\n</tr>\n<tr>\n<td><strong>Post-streptococcal glomerulonephritis</strong></td>\n<td>Granular deposits of IgG, IgM, and C3 along the <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> basement membrane</td>\n</tr>\n<tr>\n<td><strong>Good pasture syndrome</strong></td>\n<td>Linear deposits of <span class=\"customMeta\" data-dictid=\"2d9b37c62116927771891f3784d2c8\">IgG</span> along the <span class=\"customMeta\" data-dictid=\"1ad1e71a4a1692777188853097f685\">glomerular</span> basement membrane</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 34 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 65-year-old diabetic male presented to the hospital complaining of chronic abdominal discomfort and unexplained weight loss over the past few months. A palpable firm mass was detected on the left upper quadrant upon physical examination. Ultrasound revealed a large mass in the left upper pole of the kidney. Due to suspicion of renal malignancy, the patient underwent a left nephrectomy. Based on the specimen obtained, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Renal oncocytoma", "correct": true}, {"label": "B", "text": "Epithelioid angiomyolipoma", "correct": false}, {"label": "C", "text": "Clear cell carcinoma", "correct": false}, {"label": "D", "text": "Urothelial carcinoma", "correct": false}], "correct_answer": "A. Renal oncocytoma", "question_images": ["https://image.prepladder.com/notes/12f3BBbWYtvtONv2w3Jp1743570179.png"], "explanation_images": ["https://image.prepladder.com/content/cGkuGTIMENMCdEVbmKW81737520573.png", "https://image.prepladder.com/content/u366xbO60ONDV0IqI1Y51737520599.png", "https://image.prepladder.com/content/5SdxegtUZXqbC9dDmRhL1737520743.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child presents with hematuria and fever for the past 4 months. On examination, a mass-like structure was felt at the right flank. Which of the following features is not associated with this condition?", "options": [{"label": "A", "text": "Gonadal dysgenesis and renal failure", "correct": false}, {"label": "B", "text": "Cryptorchidism and absent iris", "correct": false}, {"label": "C", "text": "Bilateral malar and mandibular hypoplasia", "correct": true}, {"label": "D", "text": "Adrenal cytomegaly and macroglossia", "correct": false}], "correct_answer": "C. Bilateral malar and mandibular hypoplasia", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:623px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mutation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>WT1</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>WAGR syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Wilms tumour.</li>\n<li>Aniridia (absent iris) <strong>(Option B)</strong>.</li>\n<li>Genital anomalies (like cryptorchidism) <strong>(Option B)</strong>.</li>\n<li>Intellectual disability.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Denys-Drash syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gonadal <span class=\"customMeta\" data-dictid=\"2eb190da1c169277718620d9fd1b4a\">dysgenesis</span> (male pseudohermaphroditism) <strong>(Option A)</strong>.</li>\n<li>Early-onset <span class=\"customMeta\" data-dictid=\"b06dd1c5181692777193f14f3ed7d7\">nephropathy</span> (leading to <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> failure) <strong>(Option A)</strong>.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>WT2</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Beckwith-Widemann syndrome</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Organomegaly.</li>\n<li>Macroglossia <strong>(Option D)</strong>.</li>\n<li>Hemihypertrophy.</li>\n<li>Omphalocele.</li>\n<li>Abnormal large cells in the <span class=\"customMeta\" data-dictid=\"f955f012f716927771801d01e7d163\">adrenal</span> <span class=\"customMeta\" data-dictid=\"cab8787ce916927771852a7e72f34d\">cortex</span> (adrenal cytomegaly) <strong>(Option D)</strong>.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A renal biopsy specimen has to be examined under microscopy for the presence of nephroblastoma. Presence of which of the following findings is less likely suggestive of the same?", "options": [{"label": "A", "text": "Neuropils", "correct": true}, {"label": "B", "text": "Small blue cells", "correct": false}, {"label": "C", "text": "Adipose tissue", "correct": false}, {"label": "D", "text": "Myxoid stroma", "correct": false}], "correct_answer": "A. Neuropils", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/as2L9gsZgCO2qej1FPez1737603750.png", "https://image.prepladder.com/content/4AdToYciSgQ2HIXm2xPN1737603690.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Characteristics</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Wilms Tumor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Neuroblastoma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Location</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Kidney</li>\n<li>Most common <span class=\"customMeta\" data-dictid=\"1665a40f1016927771801899eaed5d\">abdominal</span> tumor in childhood</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Common site: <span class=\"customMeta\" data-dictid=\"f955f012f716927771801d01e7d163\">adrenal</span> medulla,</li>\n<li>Also seen in abdomen, <span class=\"customMeta\" data-dictid=\"c25071fa3816927771955eeaf9d45e\">pelvis</span> & neck.</li>\n<li>Most common primary <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> tumor in childhood.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Histological features</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Blastemal</strong>: Small blue cells. <strong>(Option B ruled out)</strong></li>\n<li><strong>Epithelial</strong>: <span class=\"customMeta\" data-dictid=\"3acd96d3c91692777180bd966dec76\">Abortive</span> tubules/glomeruli.</li>\n<li><strong>Stromal</strong>: <span class=\"customMeta\" data-dictid=\"99d12f6d811692777202e87cc63267\">Fibroblastic</span> or myxoid. <strong>(Option D ruled out)</strong></li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Small blue cells with neuroblasts,</li>\n<li>neurofibrils <strong>(neuropils) (Option A)</strong>, and <span class=\"customMeta\" data-dictid=\"0472620c171692777192c655af9c57\">mature</span> <span class=\"customMeta\" data-dictid=\"bbd799518a169277718867e02de42f\">ganglion</span> cells</li>\n<li><strong>Pseudo-rosettes</strong> (arrangements of small, round neuroblastic cells around a central fibrillary core)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">Histological image</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Mikael Häggström, M.D.\" data-hash=\"\" data-license=\"CC0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_Wilms%27_tumor,_annotated.jpg\" data-tags=\"\" height=\"1493\" src=\"https://image.prepladder.com/content/as2L9gsZgCO2qej1FPez1737603750.png\" width=\"1999\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Monika Kujdowicz\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:HE_Neuroblastoma_Homer-Wright_rosettes.jpg\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/4AdToYciSgQ2HIXm2xPN1737603690.png\" width=\"1149\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:521px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Examples</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Renal Tumors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Wilms Tumor (Nephroblastoma)</li>\n<li>Renal Cell Carcinoma</li>\n<li>Renal Lymphoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Adrenal Tumors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Neuroblastoma</li>\n<li>Pheochromocytoma</li>\n<li>Adrenal Hemangioma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hepatic Tumors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hepatoblastoma</li>\n<li>Hemangioma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>GI conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Neuroendocrine Tumors</li>\n<li>Intestinal Malrotation</li>\n<li>Meckel’s Diverticulum</li>\n<li>Hirschsprung’s Disease</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Lymphoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Non-Hodgkin’s lymphoma</li>\n<li>Hodgkin’s lymphoma</li>\n<li>Lymphoblastic lymphoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Teratoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Ovarian Teratoma</li>\n<li>Testicular Teratoma</li>\n<li>Retroperitoneal Teratoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mesenteric and Omental masses</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mesenteric Adenitis</li>\n<li>Mesenteric Cyst</li>\n<li>Lymphangioma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Vascular Tumors</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Hemangiomas (Hepatic, Cutaneous)</li>\n<li>Lymphangiomas</li>\n<li>Angiomyolipomas</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pancreatic masses</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Pancreatic Pseudocyst</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Abdominal Cysts</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Choledochal Cyst</li>\n<li>Ovarian Cysts</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inflammatory Conditions</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Appendicitis (with abscess)</li>\n<li>Crohn’s Disease</li>\n<li>Ulcerative Colitis</li>\n<li>Cystic Fibrosis</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/n6AjwB9RmaDI9ZvSnj1h1747306950.mp3", "video": ""}, {"text": "A histopathological report of renal biopsy done on a child states, “tumour cells suggestive of nephroblastoma along with adjacent sclerotic rests”. What is the risk associated with the presence of such sclerotic rests?", "options": [{"label": "A", "text": "Presence of anaplasia", "correct": false}, {"label": "B", "text": "Pulmonary metastasis", "correct": false}, {"label": "C", "text": "Contralateral tumour", "correct": true}, {"label": "D", "text": "Associated lymphoma", "correct": false}], "correct_answer": "C. Contralateral tumour", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements regarding renal cell carcinoma is false?", "options": [{"label": "A", "text": "Clear cell RCC is the most common type overall.", "correct": false}, {"label": "B", "text": "Papillary RCC is most commonly associated with dialysis patients.", "correct": false}, {"label": "C", "text": "Medullary RCC is commonly seen in sickle cell trait patients.", "correct": false}, {"label": "D", "text": "Papillary RCC has the best prognosis.", "correct": true}], "correct_answer": "D. Papillary RCC has the best prognosis.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Age group</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Most common in the 6th and 7th decades.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Male: Female ratio</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>2:1</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:140px\">\n<p>Site of origin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top; width:484px\">\n<ul>\n<li>Proximal <span class=\"customMeta\" data-dictid=\"3ddb367f1c16927771854815522adf\">convoluted</span> tubule.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Risk factors</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cigarette smoking (most important).</li>\n<li>Obesity (particularly in women) and hypertension.</li>\n<li>Unopposed <span class=\"customMeta\" data-dictid=\"a58dd68b011692777187eb72633aac\">estrogen</span> therapy.</li>\n<li>Exposure to asbestos, <span class=\"customMeta\" data-dictid=\"784bd236b21692777195bf9eb52a33\">petroleum</span> products, and heavy metals.</li>\n<li>End-stage <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> disease.</li>\n<li>Chronic <span class=\"customMeta\" data-dictid=\"4aa6035df41692777190b41d4a1583\">kidney</span> disease.</li>\n<li>Acquired <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> disease.</li>\n<li>Tuberous sclerosis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Classification</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Sporadic: Most common type.</li>\n<li>Hereditary: Autosomal dominant, young age affected.\n\t\t\t\t<ul>\n<li>Von-Hippel-Lindau syndrome.</li>\n<li>Hereditary <span class=\"customMeta\" data-dictid=\"23953d41c4169277719129b8dd795f\">leiomyomatosis</span> & <span class=\"customMeta\" data-dictid=\"b9356afdba16927771979d068c6587\">renal</span> cell cancer syndrome.</li>\n<li>Hereditary <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> carcinoma.</li>\n<li>Birt-Hogg-Dube syndrome.</li>\n</ul>\n</li>\n</ul>\n<ul>\n<li>Histological classification:\n\t\t\t\t<ul>\n<li>Clear cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (most common type) <strong>(Option A ruled out)</strong>.</li>\n<li>Papillary cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (associated with <span class=\"customMeta\" data-dictid=\"5755720cc31692777186c957a0feb7\">dialysis</span> patients) <strong>(Option B ruled out)</strong>.</li>\n<li>Chromophobe <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (best prognosis) <strong>(Option D)</strong>.</li>\n<li>Bellini <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">duct</span> (collecting duct) carcinoma.</li>\n<li>Xp11 <span class=\"customMeta\" data-dictid=\"8ba7332e86169277720060bd4507c8\">translocation</span> carcinoma.</li>\n<li>Medullary <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> (seen in patients with sickle cell trait) <strong>(Option C ruled out)</strong>.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female died within a few months after being diagnosed with renal cell carcinoma. The autopsy revealed a yellowish, spherical neoplasm in one pole of the kidney. The tumour cells invaded the renal vein and inferior vena cava. Histopathology is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Collecting duct RCC", "correct": false}, {"label": "B", "text": "Papillary RCC", "correct": false}, {"label": "C", "text": "Clear cell RCC", "correct": true}, {"label": "D", "text": "Chromophobe RCC", "correct": false}], "correct_answer": "C. Clear cell RCC", "question_images": ["https://image.prepladder.com/content/QBmIvzQFYGQY3drwg5x11737603955.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/jBgQlu7EZRXkfhJUw5PH1746472452.mp3", "video": ""}, {"text": "A 36-year-old woman presents with intermittent flank pain and occasional gross hematuria. Laboratory tests show normal renal function. A renal biopsy of a mass lesion reveals a mixture of mature adipose tissue, thick-walled blood vessels, and bundles of smooth muscle cells. All are true regarding this condition except:", "options": [{"label": "A", "text": "Commonly associated with tuberous sclerosis", "correct": false}, {"label": "B", "text": "More prevalent in males than females", "correct": true}, {"label": "C", "text": "Mostly a benign tumor", "correct": false}, {"label": "D", "text": "High susceptibility to spontaneous hemorrhage", "correct": false}], "correct_answer": "B. More prevalent in males than females", "question_images": ["https://image.prepladder.com/content/eroXDoSFlFkXktiC5vC61737520965.png"], "explanation_images": ["https://image.prepladder.com/content/8EKwcBwmgA6nvryad1HQ1737520959.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Hobnail nuclei are seen in which type of renal cell carcinoma?", "options": [{"label": "A", "text": "Clear cell renal cell carcinoma.", "correct": false}, {"label": "B", "text": "Papillary renal cell carcinoma.", "correct": false}, {"label": "C", "text": "Chromophobe renal cell carcinoma.", "correct": false}, {"label": "D", "text": "Collecting duct carcinoma.", "correct": true}], "correct_answer": "D. Collecting duct carcinoma.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/rrCRTGhwte5lOXiKKpgC1737604073.png", "https://image.prepladder.com/content/eBz7YE25RZIvTPfsQwkp1737604102.png", "https://image.prepladder.com/content/O2SJq43kS1vzDNainueh1737604178.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "On histological examination, which of the following types of renal cell carcinoma shows large cells with a plant-cell-like appearance with a perinuclear halo?", "options": [{"label": "A", "text": "Papillary RCC", "correct": false}, {"label": "B", "text": "Clear cell RCC", "correct": false}, {"label": "C", "text": "Chromophobe RCC", "correct": true}, {"label": "D", "text": "Medullary RCC", "correct": false}], "correct_answer": "C. Chromophobe RCC", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Multiple losses of entire chromosomes are seen in which type of Renal Cell Carcinoma?", "options": [{"label": "A", "text": "Papillary RCC", "correct": false}, {"label": "B", "text": "Clear cell RCC", "correct": false}, {"label": "C", "text": "Chromophobe RCC", "correct": true}, {"label": "D", "text": "Collecting duct RCC", "correct": false}], "correct_answer": "C. Chromophobe RCC", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/tBEt8NvHN172WpKb8nkS1737604319.png", "https://image.prepladder.com/content/hnInNa5oR3m8K3kkFr1d1737604384.png", "https://image.prepladder.com/content/OghZCnnEIFDkGM9o610V1737604507.png", "https://image.prepladder.com/content/4PwsQidRfoLKWKdTCvQn1737604457.png", "https://image.prepladder.com/content/ovjE3ZdFadHo09obsY6Q1737604425.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:500px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p><strong>Type of RCC</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p><strong>Causes</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\"><strong>Microscopy Features</strong></td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Clear Cell RCC <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Associated with mutations in the VHL gene (von Hippel-Lindau syndrome)</p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Cells with clear <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> due to the accumulation of <span class=\"customMeta\" data-dictid=\"2e2aa646ab1692777188e3eb8286d8\">glycogen</span> and lipids</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY-SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Clear_cell_renal_cell_carcinoma_-_2_-_alt_--_high_mag.jpg\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/tBEt8NvHN172WpKb8nkS1737604319.png\" width=\"1348\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Papillary RCC <strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Associated with-</p>\n<ul>\n<li>MET gene mutations</li>\n<li>Hereditary <span class=\"customMeta\" data-dictid=\"23953d41c4169277719129b8dd795f\">Leiomyomatosis</span> RCC</li>\n<li>Dialysis-related <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> disease</li>\n<li>Loss of Y</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Psammoma bodies may be present</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Christine Busset, Sandrine Vijgen, Benoît Lhermitte, Pu Yan\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Histopathology_of_papillary_renal_cell_carcinoma_type_1.jpg\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/hnInNa5oR3m8K3kkFr1d1737604384.png\" width=\"1352\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<br/>\n\t\t\t </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Chromophobe RCC</p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Associated with Birt-Hogg-Dubé syndrome</p>\n<p><strong>Loss of multiple chromosomes (Option C)</strong> (hypodiploidy)</p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<ul>\n<li>Cells with pale, <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> cytoplasm, <span class=\"customMeta\" data-dictid=\"2da8fc47cf169277719576cea1851f\">Perinuclear</span> halos- <strong>Plant cells</strong></li>\n<li>Hale’s colloidal iron +ve</li>\n</ul>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Nephron\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Eosinophilic_variant_of_chromophobe_renal_cell_carcinoma_--_high_mag.jpg\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/OghZCnnEIFDkGM9o610V1737604507.png\" width=\"1347\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<br/>\n\t\t\t </td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Collecting <span class=\"customMeta\" data-dictid=\"6198b5f22b16927771867e4ef8108f\">Duct</span> (Bellini Duct) RCC</p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Associated with mutations in multiple genes, including SMARCB1</p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Hobnail cells seen.</p>\n<p>Worst prognosis.</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"image by George J Netto MD - technical modifications by Nephron\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Collecting_duct_carcinoma#/media/File:Collecting_duct_carcinoma_-_2_WBAL.tif\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/4PwsQidRfoLKWKdTCvQn1737604457.png\" width=\"1150\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Medullary RCC</p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Strongly associated with sickle cell trait.</p>\n</td>\n<td style=\"border-bottom:1px solid #cccccc; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Poorly differentiated cells</p>\n<figure class=\"caption_element\"><img alt=\"\" data-author=\"Osaretin\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Renal_medullary_carcinoma_-_2_--_high_mag.jpg\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/ovjE3ZdFadHo09obsY6Q1737604425.png\" width=\"1348\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Ciliocytophthoria is seen in?", "options": [{"label": "A", "text": "Kartagener syndrome", "correct": false}, {"label": "B", "text": "Cystic fibrosis", "correct": false}, {"label": "C", "text": "Situs inversus", "correct": false}, {"label": "D", "text": "Acute respiratory infection", "correct": true}], "correct_answer": "D. Acute respiratory infection", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/3qhsEUYYWlzneP9z5UqB1737000340.png", "https://image.prepladder.com/content/lGkssRQ0IjKq3wxBJ2vm1737000384.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is false regarding extralobular sequestration?", "options": [{"label": "A", "text": "It is external to the lung.", "correct": false}, {"label": "B", "text": "It most commonly presents as a mass lesion.", "correct": false}, {"label": "C", "text": "It most often occurs in older children.", "correct": true}, {"label": "D", "text": "It has a separate pleural covering.", "correct": false}], "correct_answer": "C. It most often occurs in older children.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:630px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Extralobar sequestration</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Intralobar sequestration</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>External to the lung parenchyma</p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Within the lung parenchyma</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pleural covering</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It has a separate pleural covering</p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Shares <span class=\"customMeta\" data-dictid=\"8067ea0c85169277719561c9591e9d\">pleura</span> with adjacent lung tissue</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Embryological origin</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Congenital <span class=\"customMeta\" data-dictid=\"50a440f85816927771817d2fe50984\">anomaly</span> of the <span class=\"customMeta\" data-dictid=\"6d6e7d903b169277719662541dd5e2\">primitive</span> foregut</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Association</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It causes a mass effect</p>\n<p><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Localized infection or bronchiectasis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Venous return</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The right side of the heart through IVC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pulmonary veins</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old female presents to the clinic with a productive cough, fever, and fatigue for the past two weeks. She has a history of poorly controlled diabetes mellitus and reports recent hospitalisation for a urinary tract infection. On physical examination, coarse crackles are auscultated over the right lower lung fields. The chest X-ray is shown below. Which of the following is the most common risk factor for developing this condition?", "options": [{"label": "A", "text": "Antecedent primary lung infection", "correct": false}, {"label": "B", "text": "Aspiration of infective material", "correct": true}, {"label": "C", "text": "Septic embolism", "correct": false}, {"label": "D", "text": "Neoplasia", "correct": false}], "correct_answer": "B. Aspiration of infective material", "question_images": ["https://image.prepladder.com/content/6DIDH4P4VL4T9qoSsQtS1737489158.png"], "explanation_images": ["https://image.prepladder.com/content/Nu8HWCAuPRWynQLpRQ1R1737489168.png", "https://image.prepladder.com/content/d66z6H3oQe6CfefG1zqP1737000446.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 29-year-old previously healthy male presents with a one-week history of progressively worsening dry cough, fever, and shortness of breath. He denies any recent travel but mentions attending a crowded social gathering a week ago. He is febrile, tachypneic, and has crackles on auscultation. Laboratory investigations reveal leukocytosis with lymphopenia. A chest X-ray demonstrates patchy infiltrates in the lower lobes bilaterally. Which of the following features is not associated with this condition?", "options": [{"label": "A", "text": "Inflammatory changes are confined to the pulmonary interstitium.", "correct": false}, {"label": "B", "text": "Neutrophils are involved in this infection.", "correct": true}, {"label": "C", "text": "It is associated with malnutrition and alcoholism.", "correct": false}, {"label": "D", "text": "It is also known as walking pneumonia.", "correct": false}], "correct_answer": "B. Neutrophils are involved in this infection.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/eqWq0SkTbTypytRlcgii1737452989.png", "https://image.prepladder.com/content/Jyi5JG0ZKMOwhuIBLnip1737453103.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Definition</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>An <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> <span class=\"customMeta\" data-dictid=\"e57922b3c91692777202151895d37e\">febrile</span> <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> disease characterised by <strong>patchy</strong> <strong>inflammatory changes</strong> in the lungs, largely confined to the <strong>alveolar septa</strong> and <strong>pulmonary interstitium. (Option A)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aetiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Atypical organisms:</strong>\n<ul>\n<li>Mycoplasma pneumoniae<strong> (Most common).</strong>\n<ul>\n<li>It is also known as <strong>walking pneumonia</strong>, as the patient is <strong>not bedridden. (Option D)</strong></li>\n</ul>\n</li>\n<li>Chlamydia pneumoniae.</li>\n<li>Coxiella burnetii (Q-fever).</li>\n</ul>\n</li>\n</ul>\n<ul>\n<li>Viruses</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Morphology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Interstitial <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> reaction</strong>, virtually localised within the <strong>walls of the alveoli.</strong></li>\n<li><strong>Alveolar septa</strong> are <strong>widened</strong> and <strong>edematous</strong> and usually have a <span class=\"customMeta\" data-dictid=\"81ec3329d0169277719261f4b61d44\">mononuclear</span> <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> <span class=\"customMeta\" data-dictid=\"8fd5e2898d16927771900855b98180\">infiltrate</span> of <strong>lymphocytes</strong>, macrophages, and occasionally <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> cells.</li>\n<li><strong>Herpes simplex</strong>, <strong>varicella</strong>, and <strong>adenovirus</strong> may be associated with <strong>bronchial and alveolar <span class=\"customMeta\" data-dictid=\"53782f88d31692777187177cb73b24\">epithelium</span> necrosis</strong> and <strong>acute inflammation.</strong></li>\n</ul>\n<p><img alt=\"\" data-author=\"NA\" data-hash=\"\" data-license=\"NA\" data-source=\"NA\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/eqWq0SkTbTypytRlcgii1737452989.png\" width=\"4167\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Red hepatisation of the lungs is seen on which day?", "options": [{"label": "A", "text": "1-2", "correct": false}, {"label": "B", "text": "2-4", "correct": true}, {"label": "C", "text": "5-7", "correct": false}, {"label": "D", "text": "Beyond 7 day", "correct": false}], "correct_answer": "B. 2-4", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:676px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Stage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Days</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Characteristics</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Congestion</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1-2</p>\n<p><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gross: The lung is heavy, boggy, and red.</li>\n<li>Microscopic: <strong>Vascular engorgement</strong>, intra-alveolar fluid with <strong>neutrophils</strong> & bacteria.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Red hepatization</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2-4 <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gross: <strong>Red</strong>, firm, and <strong>airless</strong>, with a <strong>liver-like consistency</strong>, hence the term hepatization.</li>\n<li>Microscopic: <span class=\"customMeta\" data-dictid=\"8793eea96e169277718446e2ea701a\">Confluent</span> <strong>exudation</strong> with neutrophils, <strong>RBCs</strong>, and <strong>fibrin</strong> <span class=\"customMeta\" data-dictid=\"52edf0af4d1692777202dd1a490884\">filling</span> the alveoli.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Grey hepatization</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>5-8</p>\n<p><strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Gross: <strong>Greyish brown</strong> and dry surface.</li>\n<li>Microscopic: <strong>Disintegration of RBCs</strong> and <span class=\"customMeta\" data-dictid=\"47d4b14d841692777195ec9f299139\">persistence</span> of a <strong>fibrinosuppurative exudate.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Resolution</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>8-9</p>\n<p><strong>(Option D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Exudates within the <span class=\"customMeta\" data-dictid=\"0dd428c12116927771819285c8849c\">alveoli</span> are broken down by <span class=\"customMeta\" data-dictid=\"11d4157da4169277718762144a4fe7\">enzymatic</span> <span class=\"customMeta\" data-dictid=\"47d4bcce081692777186a1aafdde1a\">digestion</span> to produce <strong>granular debris.</strong></li>\n<li>Debris may be reabsorbed/ingested by macrophages/expectorated/<strong>organised by fibroblasts.</strong></li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male with a long-standing history of chronic alcohol abuse presents with a one-week history of high-grade fever, productive cough with rust-coloured sputum, and right-sided pleuritic chest pain. He reports frequent binge drinking episodes and denies any recent travel or sick contacts. On examination, he appears ill, with a temperature of 39.5°C, tachypnea, and decreased breath sounds over the right lower lung fields. Laboratory investigations reveal leukocytosis with neutrophilia and elevated inflammatory markers. What is the most likely organism implicated in this condition?", "options": [{"label": "A", "text": "Mycoplasma pneumoniae", "correct": false}, {"label": "B", "text": "Legionella pneumophila", "correct": false}, {"label": "C", "text": "Moraxella catarrhalis", "correct": false}, {"label": "D", "text": "Klebsiella pneumoniae", "correct": true}], "correct_answer": "D. Klebsiella pneumoniae", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following: 1) Pneumocystis pneumonia a) 2) Blastomycosis b) 3) Aspergillus c) 4) Measles d)", "options": [{"label": "A", "text": "1-b, 2-d, 3-c, 4-a", "correct": true}, {"label": "B", "text": "1-a, 2-d, 3-c, 4-b", "correct": false}, {"label": "C", "text": "1-c, 2-d, 3-b, 4-a", "correct": false}, {"label": "D", "text": "1-b, 2-a, 3-c, 4-d", "correct": false}], "correct_answer": "A. 1-b, 2-d, 3-c, 4-a", "question_images": ["https://image.prepladder.com/content/i73imzU6JImj1ynnOfUa1737000504.png", "https://image.prepladder.com/content/FlkU3jTXzbqzxcf2ADjG1737000556.png", "https://image.prepladder.com/content/LtF8M3tzo5XcoKcddO6H1737000584.png", "https://image.prepladder.com/content/m9DEsAa8L9OeyfCUcyJt1737000601.png"], "explanation_images": ["https://image.prepladder.com/content/WGaSU85LJsU7VG9o5YeU1737000675.png", "https://image.prepladder.com/content/4rTRDknxbOb9YRvMzyZT1737000615.png", "https://image.prepladder.com/content/EOJee1YKTk9fqiwbUGeZ1737000638.png", "https://image.prepladder.com/content/QYXxjBrmz0agTzSP5Jhz1737000517.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions is not associated with aspiration?", "options": [{"label": "A", "text": "Mendelson syndrome", "correct": false}, {"label": "B", "text": "Lipoid pneumonia", "correct": false}, {"label": "C", "text": "Meconium aspiration syndrome", "correct": false}, {"label": "D", "text": "Nelson syndrome", "correct": true}], "correct_answer": "D. Nelson syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ijVVpDA4yWaUS24rlSvo1737000732.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old man presents with a persistent cough, night sweats, and unintentional weight loss. Chest X-ray reveals an infiltrate in the upper lobe of the right lung. Which of the following pathological processes is not seen in this condition?", "options": [{"label": "A", "text": "Th2-mediated macrophage activation and killing of bacteria.", "correct": true}, {"label": "B", "text": "The bacterium blocks phagolysosome formation by recruiting a host protein called coronin to the membrane of the phagosome.", "correct": false}, {"label": "C", "text": "M. tuberculosis is recognised by innate immunity receptors.", "correct": false}, {"label": "D", "text": "It causes granulomatous inflammation and damage.", "correct": false}], "correct_answer": "A. Th2-mediated macrophage activation and killing of bacteria.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Entry into macrophages</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>M. <span class=\"customMeta\" data-dictid=\"8d98ce2d3616927772013bfc3e0528\">tuberculosis</span> enters macrophages by <strong>phagocytosis</strong>.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Replication in macrophages</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>M. <span class=\"customMeta\" data-dictid=\"8d98ce2d3616927772013bfc3e0528\">tuberculosis</span> inhibits the <span class=\"customMeta\" data-dictid=\"76948f718016927771924774ade7e9\">maturation</span> of the phagosome.</li>\n<li>It <strong>blocks the formation of the <span class=\"customMeta\" data-dictid=\"8fcf5b7a1f1692777195dd42c8b518\">phagolysosome</span> (Option B)</strong>, allowing the <span class=\"customMeta\" data-dictid=\"ff3e9793d01692777182b598b4a090\">bacterium</span> to replicate unchecked within the vesicle.</li>\n<li>Thus, during the earliest stage of <span class=\"customMeta\" data-dictid=\"d8faacc2321692777196366289bd93\">primary tuberculosis</span> (<3 weeks) in the nonsensitized individual, bacteria <span class=\"customMeta\" data-dictid=\"986d4f70531692777196806b9cb494\">proliferate</span> in the <span class=\"customMeta\" data-dictid=\"10e2dee19e1692777196673db90c23\">pulmonary</span> alveolar macrophages and air spaces, resulting in <strong>bacteremia</strong> and <strong>seeding of multiple sites.</strong></li>\n<li>Despite the bacteremia, most people at this stage are <strong>asymptomatic</strong> or have a <strong>mild flu-like illness.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Innate <span class=\"customMeta\" data-dictid=\"4f9ee631c21692777189b1e0cdc91c\">immunity</span> (Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Mycobacterial lipoarabinomannan binds <strong>TLR2</strong>, and unmethylated CpG nucleotides bind <strong>TLR9.</strong></li>\n<li>These interactions initiate and enhance the <span class=\"customMeta\" data-dictid=\"cc8345eacd1692777190c2e063a170\">innate</span> and adaptive immune responses to M. tuberculosis, as described below.\n\t\t\t\t<ul>\n<li><strong>Th1 response</strong>, Th1 mediated <span class=\"customMeta\" data-dictid=\"2748357f451692777191377abbe2a6\">macrophage</span> activation, and killing of the bacteria (mediated by <strong>IFN-γ</strong>).</li>\n<li><strong>Granulomatous <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> and damage</strong> (mediated by <strong>Th1</strong> <strong>response</strong>) <strong>(Option D)</strong>.\n\t\t\t\t\t<ul>\n<li><strong>Caseous</strong> <strong>necrosis</strong> and giant cell formation (epithelioid histiocytes-giant cells, mediated by <strong>IFN-γ</strong>).</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following lesions with their site of occurrence. Lesion Site 1 Puhl’s focus i Lung + Lymph node 2 Simon focus ii Blood vessels 3 Ghon complex iii Supraclavicular region of the lung 4 Weighert focus iv The apex of the lung", "options": [{"label": "A", "text": "1-iii, 2-iv, 3-i, 4-ii", "correct": true}, {"label": "B", "text": "1-iii, 2-iv, 3-ii, 4-i", "correct": false}, {"label": "C", "text": "1-iv, 2-iii, 3-i, 4-ii", "correct": false}, {"label": "D", "text": "1-iv, 2-i, 3-ii, 4-iii", "correct": false}], "correct_answer": "A. 1-iii, 2-iv, 3-i, 4-ii", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/YrWXixMm3XZ5UMrSjOEU1737000788.png", "https://image.prepladder.com/content/J3jlr9lS7aHGqGmhrRbq1737000807.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:467px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Puhl’s focus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Supraclavicular region of the lung</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Simon focus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Apex of the lung</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Ghon complex</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lung + <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">Lymph</span> node</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Weighert focus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blood vessel</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary tuberculosis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It develops in a <strong>previously unexposed</strong> and therefore <strong>unsensitized person.</strong></li>\n<li>The primary organ involved is mostly the <strong>lungs</strong>.</li>\n<li><strong>Location:</strong>\n<ul>\n<li>Sub-pleural region.</li>\n<li><strong>Lower part of the upper lobe</strong> & <strong>upper part of the lower lobe.</strong></li>\n</ul>\n</li>\n<li><strong>Ghon’s focus:</strong> Grey-white area of <span class=\"customMeta\" data-dictid=\"e747a47db616927771908bff4b8931\">inflammation</span> with consolidation.</li>\n<li><strong>Ghon’s complex:</strong> Ghon’s focus + inflamed regional <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> nodes <strong>(Statment iii)</strong>.</li>\n<li><strong>Histology:</strong> <strong>Granulomatous <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> reaction</strong> with both caseating and non-caseating tubercles.</li>\n<li><strong>Simon’s focus:</strong> <span class=\"customMeta\" data-dictid=\"c8d9b6cbbb1692777194c4bc31f01f\">Occult</span> <span class=\"customMeta\" data-dictid=\"33bb6837aa169277718854a46f5cbd\">hematogenous</span> dissemination to the <span class=\"customMeta\" data-dictid=\"2d7ea2751316927771816ceb31afee\">apex</span> of the lung. <strong>(Statement ii)</strong></li>\n<li><strong>Fate:</strong>\n<ul>\n<li>95% of the cases are controlled by immunity, calcified, healed lesions and hilar <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> nodes (<strong>Ranke complex</strong>).</li>\n<li>5% of the cases are progressive <strong>(Progressive primary TB).</strong>\n<ul>\n<li>Resembles <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">acute</span> bacterial pneumonia.</li>\n<li>Lymphohematogenous dissemination may cause <span class=\"customMeta\" data-dictid=\"a50c41365a1692777201501cb6b378\">tuberculous</span> <span class=\"customMeta\" data-dictid=\"7d8f74eaae16927771928214d10c17\">meningitis</span> and/or <span class=\"customMeta\" data-dictid=\"de0ef5a95116927771922f41d2b8b5\">miliary</span> TB.</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Secondary tuberculosis</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It arises in a <strong>previously sensitised host.</strong></li>\n<li>It may follow shortly after primary tuberculosis, but more commonly, it appears months to years after the initial infection, usually when the host resistance is weakened.</li>\n<li>The <span class=\"customMeta\" data-dictid=\"c6223a27fb169277718147405290e1\">apical</span> and <span class=\"customMeta\" data-dictid=\"a5c6cb079d16927771967e62ffee72\">posterior</span> <span class=\"customMeta\" data-dictid=\"d7dd6ae43c1692777191cf75c0bd58\">lobe</span> segments are involved due to high O<sub>2</sub> concentration (<strong>Puhl’s focus</strong>) <strong>(Statement i)</strong>.</li>\n<li>The <span class=\"customMeta\" data-dictid=\"71409dc88a1692777190aedbc558b6\">infraclavicular</span> <span class=\"customMeta\" data-dictid=\"d5e7bb15851692777191b39417c26a\">lesion</span> is called <strong>Assman’s focus.</strong></li>\n<li>Regional <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> involvement is late.</li>\n<li><strong>Cavitation</strong> occurs readily with the <span class=\"customMeta\" data-dictid=\"8f88b9c691169277718754ca072062\">erosion</span> of the cavities into an airway.</li>\n<li><strong>Histology:</strong> Active lesions show coalescent tubercles with <strong>central caseation</strong> (Caseous necrosis).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Disseminated TB:</strong> Spread to other organs.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 20 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 20-year-old male presented with cough and breathing difficulty and was diagnosed with emphysema after radiographic examination. Which of the following genetic conditions should be suspected as a possible cause?", "options": [{"label": "A", "text": "Cystic fibrosis", "correct": false}, {"label": "B", "text": "Asthma", "correct": false}, {"label": "C", "text": "Alpha-1 antitrypsin deficiency", "correct": true}, {"label": "D", "text": "Bronchiectasis", "correct": false}], "correct_answer": "C. Alpha-1 antitrypsin deficiency", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following types of emphysema with their characteristic features: Types of Emphysema Characteristic Features 1) Centriacinar emphysema A) Uniformly affects the entire acinus, commonly associated with alpha 1 antitrypsin deficiency 2) Panacinar emphysema B) Predominantly involves the upper lobes, often associated with bullae formation. Alveolar ducts and sacs are spared 3) Paraseptal emphysema C) Associated with scarring and fibrosis, often seen in patients with chronic inflammation or recurrent infections 4) Irregular emphysema D) Involves the distal airways and is often associated with spontaneous pneumothorax", "options": [{"label": "A", "text": "1-a, 2-c, 3-b, 4-d", "correct": false}, {"label": "B", "text": "1-b, 2-a, 3-d, 4-c", "correct": true}, {"label": "C", "text": "1-a, 2-b, 3-c, 4-d", "correct": false}, {"label": "D", "text": "1-d, 2-b, 3-a, 4-c", "correct": false}], "correct_answer": "B. 1-b, 2-a, 3-d, 4-c", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ZuEnihd9NAoJerea8IK21736930577.png", "https://image.prepladder.com/content/1VLRcw9Mbji3x6E3JCBs1736930627.png", "https://image.prepladder.com/content/tk9dKcDuNNgXp7xu8RoN1736930665.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:620px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Centriacinar (M/C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Panacinar</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Paraseptal</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Irregular</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Involves</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Proximal acinus</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Proximal & <span class=\"customMeta\" data-dictid=\"5ff25303a01692777186731f6a4f5c\">distal</span> acini</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Distal acinus</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Irregular involvement</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Site</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Upper lobes especially <span class=\"customMeta\" data-dictid=\"c6223a27fb169277718147405290e1\">apical</span> segments</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Lower zones & <span class=\"customMeta\" data-dictid=\"1ba6a9cfe11692777181950edd7a6d\">anterior</span> margins of the lung.</p>\n\t\t\t \n\n\t\t\t<p>More severe at the base of the lung.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The upper half of the lungs (more severe).</p>\n\t\t\t \n\n\t\t\t<p>Airspaces can <span class=\"customMeta\" data-dictid=\"a1b06f401f1692777203a53393ba98\">form</span> cyst-like structures.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Any part of the lung can be involved.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aetiology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Smokers</p>\n\t\t\t \n\n\t\t\t<p>Chronic bronchitis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>α1-antitrypsin deficiency</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Spontaneous pneumothorax</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Depends on involvement, most found in autopsy</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following mechanisms is not involved in the development of emphysema?", "options": [{"label": "A", "text": "Toxic injury and inflammation leading to variable degrees of parenchymal destruction.", "correct": false}, {"label": "B", "text": "Protease-antiprotease imbalance with a relative deficiency of protective antiproteases.", "correct": false}, {"label": "C", "text": "The presence of T and B cells in affected parts of the lung indicates a robust adaptive immune response.", "correct": true}, {"label": "D", "text": "Oxidative stress induced by substances in tobacco smoke, alveolar damage, and inflammatory cells.", "correct": false}], "correct_answer": "C. The presence of T and B cells in affected parts of the lung indicates a robust adaptive immune response.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/nn5wKvCQv1cXIJ54kmzK1736930725.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 65-year-old man has been a heavy smoker for the past 40 years and presents with complaints of progressive shortness of breath, especially with exertion, and a chronic cough with occasional scanty sputum production. Physical examination reveals a barrel-shaped chest, decreased breathing sounds, and a prolonged expiratory phase. Based on the clinical presentation and history, what is the most likely diagnosis?", "options": [{"label": "A", "text": "Chronic bronchitis", "correct": false}, {"label": "B", "text": "Emphysema", "correct": true}, {"label": "C", "text": "Pulmonary fibrosis", "correct": false}, {"label": "D", "text": "Asthma", "correct": false}], "correct_answer": "B. Emphysema", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:569px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Bronchitis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Emphysema</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age (years)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>40–45</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>50–75</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dyspnea </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mild; late</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe; early</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cough </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Early; copious sputum</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Late; scanty sputum</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Infections </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Common</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Occasional</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Respiratory <span class=\"customMeta\" data-dictid=\"80feaae4b31692777190ea1ba3fc25\">insufficiency</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Early, periodic</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>End-stage, unremitting</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cor pulmonale </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Common</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Uncommon, end-stage</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Airway resistance </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal or slightly increased</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Elastic recoil</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Normal</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Chest <span class=\"customMeta\" data-dictid=\"5c71603ac81692777197e2aa1e7fd3\">radiograph</span> </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Prominent vessels; large heart size</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hyperinflation; normal heart size</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Blue bloater</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Pink puffer</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male patient presents with a history of chronic cough, increased sputum production, and shortness of breath. He reports that these symptoms have been present for several years and have gradually worsened over time. The patient is a lifelong smoker, having smoked one pack of cigarettes per day for the past 20 years. What is the likely diagnosis?", "options": [{"label": "A", "text": "Emphysema", "correct": false}, {"label": "B", "text": "Asthma", "correct": false}, {"label": "C", "text": "Chronic bronchitis", "correct": true}, {"label": "D", "text": "Lung cancer", "correct": false}], "correct_answer": "C. Chronic bronchitis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ERBcj7I9DvwAnKFdIyTV1736930852.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is not true regarding chronic bronchitis?", "options": [{"label": "A", "text": "Reid index &gt;0.4", "correct": false}, {"label": "B", "text": "The most common cause is smoking", "correct": false}, {"label": "C", "text": "The most common cause of exacerbation is Haemophilus influenzae.", "correct": false}, {"label": "D", "text": "Recurrent, episodic attacks of wheezing, prolonged expiration, dyspnea (shortness of breath), and chest tightness.", "correct": true}], "correct_answer": "D. Recurrent, episodic attacks of wheezing, prolonged expiration, dyspnea (shortness of breath), and chest tightness.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 32-year-old female presents with recurrent episodes of wheezing, coughing, and shortness of breath. On further testing, a diagnosis of asthma was made. Which of the following best describes the underlying pathophysiological changes seen in this patient's condition?", "options": [{"label": "A", "text": "Reduced goblet cell secretion", "correct": false}, {"label": "B", "text": "Thinning of the basement membrane", "correct": false}, {"label": "C", "text": "Increase in airway inflammation and remodeling", "correct": true}, {"label": "D", "text": "Decreased submucosal gland activity", "correct": false}], "correct_answer": "C. Increase in airway inflammation and remodeling", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:662px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Images A & B</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Comparison of a normal <span class=\"customMeta\" data-dictid=\"3b9dd3166f1692777180b697887ccb\">airway</span> and an <span class=\"customMeta\" data-dictid=\"3b9dd3166f1692777180b697887ccb\">airway</span> involved in asthma.</li>\n<li>The asthmatic <span class=\"customMeta\" data-dictid=\"3b9dd3166f1692777180b697887ccb\">airway</span> is marked by the accumulation of <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> in the bronchial <span class=\"customMeta\" data-dictid=\"e87def492e1692777191eda63cfc5e\">lumen</span> secondary to\n\t\t\t\t<ul>\n<li><strong>Increase in the number of mucus-secreting goblet cells</strong> in the <strong>mucosa (Option A)</strong></li>\n<li><strong>Hypertrophy of <span class=\"customMeta\" data-dictid=\"7cb424e4921692777199f9951be2ce\">submucosal</span> glands (Option D)</strong>, intense <span class=\"customMeta\" data-dictid=\"e025d338b21692777184b4a309cbfb\">chronic inflammation</span> due to the <span class=\"customMeta\" data-dictid=\"9bb62ce0f71692777197fcc2b5f29c\">recruitment</span> of eosinophils, macrophages, and other <span class=\"customMeta\" data-dictid=\"9d21dd5d3116927771907405b181bc\">inflammatory</span> cells.</li>\n</ul>\n</li>\n<li>The <strong>basement <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> is thickened (Option B),</strong> and there is <strong>hypertrophy and <span class=\"customMeta\" data-dictid=\"4c5d5ef6c31692777189820d4b320d\">hyperplasia</span> of smooth muscle cells.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Image C</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Inhaled allergens (antigen) elicit a <strong>Th2-dominated response</strong> favouring <strong>IgE production</strong> and <strong>eosinophil recruitment.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Image D</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>On re-exposure to antigen, the immediate reaction is <span class=\"customMeta\" data-dictid=\"3978e9614f1692777200abbe4cfa34\">triggered</span> by antigen-induced <span class=\"customMeta\" data-dictid=\"2cf4952c63169277718543a0883583\">cross-linking</span> of <span class=\"customMeta\" data-dictid=\"a54166a5961692777189c5557f61f3\">IgE</span> <span class=\"customMeta\" data-dictid=\"d82fcb9d1f16927771836a9f6ccf14\">bound</span> to Fc receptors on <span class=\"customMeta\" data-dictid=\"1f95a52091169277719133cc234fe0\">mast</span> cells.</li>\n<li>These cells release preformed mediators that directly and via neuronal reflexes induce <strong>bronchospasm</strong>, <strong>increased <span class=\"customMeta\" data-dictid=\"526ede3fee169277720184378acc5e\">vascular</span> permeability</strong>, <strong>mucus</strong> <strong>production</strong>, and <strong>leukocyte recruitment.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Image E</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Leukocytes are recruited to the site of the reaction (neutrophils, eosinophils, and basophils.</li>\n<li>Lymphocytes and monocytes release additional mediators that initiate the late-phase reaction.</li>\n<li>Several factors released from eosinophils (e.g., <strong>major basic protein</strong>, <strong>eosinophil cationic protein</strong>) also cause damage to the epithelium.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male has a history of recurrent wheezing, coughing, and shortness of breath. His sputum microscopy, shown in the image below, reveals the following finding. Which best describes this finding?", "options": [{"label": "A", "text": "Extrusion of mucus plugs from the subepithelial mucous gland ducts or bronchioles.", "correct": false}, {"label": "B", "text": "Ciliated columnar cells sloughed from the bronchial mucosa.", "correct": false}, {"label": "C", "text": "Polypoid plugs of loose organizing connective tissue within the bronchioles.", "correct": false}, {"label": "D", "text": "They are composed of Galectin 10.", "correct": true}], "correct_answer": "D. They are composed of Galectin 10.", "question_images": ["https://image.prepladder.com/content/luNVRw14Hk2DkS4HQZzl1736930905.png"], "explanation_images": ["https://image.prepladder.com/content/iplRZos32xqGcLU7LyQZ1736930963.png", "https://image.prepladder.com/content/hOkA6wV6XaQ61ahew2ty1736931002.png", "https://image.prepladder.com/content/Ybo7SUHTBhQJXZAlaBCS1736931037.png", "https://image.prepladder.com/content/8AyFzyz0wKLcCCRxHVaA1736931073.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Charcot-Leyden crystals</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Composed of an <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> protein (Galectin-10).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Curschmann spirals</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Extrusion of <span class=\"customMeta\" data-dictid=\"ab75ea330616927771938a64f8ebd6\">mucus</span> plugs from <span class=\"customMeta\" data-dictid=\"94aff4fd141692777199a78b5ed2eb\">subepithelial</span> <span class=\"customMeta\" data-dictid=\"26080f047a169277719334625cadef\">mucous</span> <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> ducts or bronchioles.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Creola bodies</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Ciliated columnar cells sloughed from the bronchial mucosa.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/wawPrgBqc2azxErUeo2P1746452184.mp3", "video": ""}, {"text": "A 30-year-old patient presents with a history of recurrent wheezing, coughing, and shortness of breath. Upon further investigation, it is found that the patient has a family history of allergies and asthma. Which genetic factor is most likely co-related to the severity of this condition?", "options": [{"label": "A", "text": "Variant IL-4 receptor gene", "correct": false}, {"label": "B", "text": "IL-13 polymorphism", "correct": false}, {"label": "C", "text": "ADAM33 polymorphism", "correct": false}, {"label": "D", "text": "YKL40 gene mutation", "correct": true}], "correct_answer": "D. YKL40 gene mutation", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old male presents to the emergency department with complaints of chronic cough with production of purulent sputum, intermittent hemoptysis, and recurrent respiratory infections over the past several years. He reports a history of childhood respiratory infections and no significant past medical history. Physical examination reveals coarse crackles and rhonchi on auscultation of the chest. Chest X-ray shows bilateral bronchial wall thickening and tram-line shadows. Which of the following is unlikely to be a cause for this condition?", "options": [{"label": "A", "text": "Primary ciliary dyskinesia", "correct": false}, {"label": "B", "text": "Bronchial Asthma", "correct": true}, {"label": "C", "text": "Cystic fibrosis", "correct": false}, {"label": "D", "text": "Kartagener syndrome", "correct": false}], "correct_answer": "B. Bronchial Asthma", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Congenital or <span class=\"customMeta\" data-dictid=\"ee5175c06116927771880846d1cbe0\">hereditary</span> conditions (Options A, C, and D)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Cystic fibrosis</li>\n<li>Primary <span class=\"customMeta\" data-dictid=\"1be9f55b2d1692777184b9d813b17e\">ciliary</span> dyskinesia</li>\n<li>Kartagener syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Severe necrotising pneumonia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Caused by bacteria, viruses, or fungi</li>\n<li>This may be a single severe episode or <span class=\"customMeta\" data-dictid=\"c64e3a661b1692777197afc2ff7bca\">recurrent</span> infection</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bronchial obstruction</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Tumor</li>\n<li>Foreign body</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Idiopathic (50% of the cases)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Dysfunctional host <span class=\"customMeta\" data-dictid=\"4f9ee631c21692777189b1e0cdc91c\">immunity</span> to <span class=\"customMeta\" data-dictid=\"aa279cf1f016927771903f195bb1b9\">infectious</span> agents leads to chronic inflammation</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following statements accurately describes the pathophysiology of Kartagener's syndrome?", "options": [{"label": "A", "text": "Mutation in the CFTR gene leading to impaired ciliary function.", "correct": false}, {"label": "B", "text": "Autosomal dominant inheritance pattern affecting the cilia in the respiratory tract.", "correct": false}, {"label": "C", "text": "The primary defect involves dynein arm proteins, leading to impaired ciliary motility.", "correct": true}, {"label": "D", "text": "Characterized by an excess of cilia in the respiratory epithelium.", "correct": false}], "correct_answer": "C. The primary defect involves dynein arm proteins, leading to impaired ciliary motility.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old male presents with a chronic cough productive of copious sputum. He reports frequent respiratory infections over the past several years. Physical examination reveals digital clubbing and coarse crackles on auscultation. An HRCT is done and shown below. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Tuberculosis", "correct": false}, {"label": "B", "text": "Asthma", "correct": false}, {"label": "C", "text": "Chronic obstructive pulmonary disease", "correct": false}, {"label": "D", "text": "Bronchiectasis", "correct": true}], "correct_answer": "D. Bronchiectasis", "question_images": ["https://image.prepladder.com/content/LxZI8sWyggb0Lviw7cM61736931126.png"], "explanation_images": ["https://image.prepladder.com/notes/yLFaV5Gn8iV3aVaf6wQo1742624583.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 22 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Respiratory distress syndrome is due to the deficiency of?", "options": [{"label": "A", "text": "Dipalmitoyl Phosphatidylcholine", "correct": true}, {"label": "B", "text": "Phosphatidylserine", "correct": false}, {"label": "C", "text": "Phosphatidylethanolamine", "correct": false}, {"label": "D", "text": "Phosphatidylinositol", "correct": false}], "correct_answer": "A. Dipalmitoyl Phosphatidylcholine", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Phospholipids </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Location</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Function</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Synthesis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Significance</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Phosphatidylserine </strong></p>\n<p><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Inner <span class=\"customMeta\" data-dictid=\"4c3d2d86ec1692777191af6eda4772\">leaflet</span> of the <strong>plasma membrane</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>\n<p>Involved in <strong>apoptosis</strong>.</p>\n</li>\n<li>\n<p>It flips to the outer <span class=\"customMeta\" data-dictid=\"4c3d2d86ec1692777191af6eda4772\">leaflet</span> of the <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> membrane, serving as a <strong>signal for phagocytes</strong> to engulf the dying cell.</p>\n</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Synthesized in the <strong>endoplasmic <span class=\"customMeta\" data-dictid=\"1b6498ff211692777197ae0981e366\">reticulum</span> (ER)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Plays a role in <strong>blood clotting</strong> by facilitating the binding of <span class=\"customMeta\" data-dictid=\"58c17961c71692777184ab55a9c4df\">clotting</span> factors.</p>\n<p>Supports neuronal function.</p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Phosphatidylethanolamine</strong></p>\n<p><strong>(Option C ruled out)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>All <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> membranes</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>\n<p>Important for<strong> <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> fusion</strong> and the structural integrity of <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> membranes.</p>\n</li>\n<li>\n<p>Serves as a <span class=\"customMeta\" data-dictid=\"ae13cdc5c3169277719683e9f6bda5\">precursor</span> for the <span class=\"customMeta\" data-dictid=\"3fda45538a1692777199ec2a5478a5\">synthesis</span> of phosphatidylserine.</p>\n</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Synthesized in the <strong>ER</strong> via the <strong>cytidine diphosphate-ethanolamine (CDP-ethanolamine) pathway</strong> or by <span class=\"customMeta\" data-dictid=\"52adc3ebf01692777185395a8b1e8c\">decarboxylation</span> of <span class=\"customMeta\" data-dictid=\"ae93185bf016927771958c234af6d9\">phosphatidylserine</span> in the mitochondria.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Plays a role in <strong>lipid metabolism</strong> and <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> dynamics.</li>\n<li>Deficiencies can impact <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> functions and are associated with various neurological disorders.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Phosphatidylinositol</strong></p>\n<p><strong>(Option D ruled out)</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>plasma <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> and <span class=\"customMeta\" data-dictid=\"a621be29da16927771901bc91014d1\">intracellular</span> membranes</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>\n<p>Involved in <strong>cell <span class=\"customMeta\" data-dictid=\"f9016f36fd1692777198b0fd5e9c6d\">signaling</span> pathways</strong>, particularly through the production of <strong>secondary messengers</strong></p>\n</li>\n<li>\n<p>Plays a role in <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> <span class=\"customMeta\" data-dictid=\"4c550b1d7a1692777200641b5f4e28\">trafficking</span> and cytoskeletal organization.</p>\n</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Produced in the <strong>ER and Golgi apparatus</strong> from CDP-DAG and inositol.</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Crucial for the function of <span class=\"customMeta\" data-dictid=\"b47c9c6144169277719010eaa1a0ee\">insulin</span> <span class=\"customMeta\" data-dictid=\"f9016f36fd1692777198b0fd5e9c6d\">signaling</span> and other receptor-mediated <span class=\"customMeta\" data-dictid=\"28f5a05c8b1692777198471034364a\">signal transduction</span> pathways.</li>\n<li>Defects in <span class=\"customMeta\" data-dictid=\"26d585d1e41692777195144f4452a8\">phosphatidylinositol</span> <span class=\"customMeta\" data-dictid=\"5b1a045f5f169277719210c0ac7a1e\">metabolism</span> are <span class=\"customMeta\" data-dictid=\"8d0fca798b1692777191b6cd41880f\">linked</span> to various diseases, including diabetes and cancer.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The diagram below shows the pressure–volume curves for 3 different lungs. Which of the following is the best representation of compliance between the three lungs?", "options": [{"label": "A", "text": "A&lt;B&lt;C", "correct": false}, {"label": "B", "text": "B&gt;A&gt;C", "correct": true}, {"label": "C", "text": "B&gt;C&gt;A", "correct": false}, {"label": "D", "text": "C&gt;A&gt;B", "correct": false}], "correct_answer": "B. B>A>C", "question_images": ["https://image.prepladder.com/content/DA4kqIukUpLX12myiw9q1691490659.png"], "explanation_images": [], "explanation": "<p>Correct Option B: \n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In which of the subsequent situations does oxygen therapy prove to be ineffective?", "options": [{"label": "A", "text": "Asthma", "correct": false}, {"label": "B", "text": "Acute myocardial infarction", "correct": false}, {"label": "C", "text": "Pulmonary edema", "correct": false}, {"label": "D", "text": "Central respiratory depression", "correct": true}], "correct_answer": "D. Central respiratory depression", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D: Central <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span&g\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In peripheral oxygen sensing chemoreceptors, which ion is implicated?", "options": [{"label": "A", "text": "Potassium", "correct": true}, {"label": "B", "text": "Calcium", "correct": false}, {"label": "C", "text": "Sodium", "correct": false}, {"label": "D", "text": "Chlorine", "correct": false}], "correct_answer": "A. Potassium", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Comment on the breathing pattern of a patient with prolonged inspiratory spasms that resemble breath holding?", "options": [{"label": "A", "text": "Cheyne stokes breathing", "correct": false}, {"label": "B", "text": "Kussmaul breathing", "correct": false}, {"label": "C", "text": "Apneustic breathing", "correct": true}, {"label": "D", "text": "Biot breathing", "correct": false}], "correct_answer": "C. Apneustic breathing", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Apneustic breathing\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Hypoxic Hypoxia is seen in which of the following?", "options": [{"label": "A", "text": "CO poisoning", "correct": false}, {"label": "B", "text": "HCN poisoning", "correct": false}, {"label": "C", "text": "Ischemia", "correct": false}, {"label": "D", "text": "A-V shunt", "correct": true}], "correct_answer": "D. A-V shunt", "question_images": [], "explanation_images": [], "explanation": "\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>Type of Hypoxia</strong></p>\n</td>\n<td>\n<p><strong>Etiology</strong></p>\n</td>\n<td>\n<p><strong>Examples</strong></p>\n</td>\n<td>\n<p><strong>PaCO2</strong></p>\n</td>\n<td>\n<p><strong>PaO2</strong></p>\n</td>\n<td>\n<p><strong>Cyanosis</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Hypoxic Hypoxia</p>\n</td>\n<td>\n<p>Inadequate oxygen supply or impaired utilization</p>\n</td>\n<td>\n<p>High altitude, <span class=\"customMeta\" data-dictid=\"44758fcec31692777184e24fa84582\">CO</span> poisoning, HCN poisoning, <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> diseases</p>\n</td>\n<td>\n<p>Normal</p>\n</td>\n<td>\n<p>Low</p>\n</td>\n<td>\n<p>Present</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Anemic Hypoxia</p>\n</td>\n<td>\n<p>Reduced oxygen-carrying capacity of blood</p>\n</td>\n<td>\n<p>Anemia, blood loss, hemoglobinopathies, <span class=\"customMeta\" data-dictid=\"bb021d26d3169277718336718849a5\">carbon monoxide</span> poisoning</p>\n</td>\n<td>\n<p>Normal</p>\n</td>\n<td>\n<p>Low</p>\n</td>\n<td>\n<p>Present</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Stagnant Hypoxia</p>\n</td>\n<td>\n<p>Impaired <span class=\"customMeta\" data-dictid=\"82cc227a1c169277718387905b50c6\">blood flow</span> or <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> circulation</p>\n</td>\n<td>\n<p>Heart failure, shock, <span class=\"customMeta\" data-dictid=\"f3739d892c1692777184b2e134615c\">circulatory</span> disorders, vasoconstriction</p>\n</td>\n<td>\n<p>Normal</p>\n</td>\n<td>\n<p>Low</p>\n</td>\n<td>\n<p>Present</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Histotoxic Hypoxia</p>\n</td>\n<td>\n<p>Inability of cells to utilize oxygen effectively due to toxic substances or <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> disorders</p>\n</td>\n<td>\n<p>Cyanide poisoning, certain <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> disorders</p>\n</td>\n<td>\n<p>Variable</p>\n</td>\n<td>\n<p>Variable</p>\n</td>\n<td>\n<p>May be absent or mild</p>\n</td>\n</tr>\n</tbody>\n</table>\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>1.</strong></p>\n</td>\n<td>\n<p><strong>Hypoxic hypoxia</strong></p>\n</td>\n<td>\n<p><strong>Low SaO2 and low SvO2 </strong></p>\n</td>\n<td>\n<p><strong>Cyanosis ++</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>2.</strong></p>\n</td>\n<td>\n<p><strong>Anemic hypoxia</strong></p>\n</td>\n<td>\n<p><strong>1. Anaemia (Low Hb)</strong></p>\n<p><strong>2. CO- <span class=\"customMeta\" data-dictid=\"072b8af16e1692777196f21b086f92\">poisoning</span> </strong></p>\n<p><strong>3. Meth- Hb (brown colour)</strong></p>\n</td>\n<td>\n<p><strong>1. <span class=\"customMeta\" data-dictid=\"f3b66d8ec4169277718566066add68\">Cyanosis</span> is rare</strong></p>\n<p><strong>2. No cyanosis</strong></p>\n<p><strong>3. <span class=\"customMeta\" data-dictid=\"f3b66d8ec4169277718566066add68\">cyanosis</span> like appearance can be seen as not true cyanosis.</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>3.</strong></p>\n</td>\n<td>\n<p><strong>Stagnant <span class=\"customMeta\" data-dictid=\"a249eeb5551692777189661d39c1b2\">hypoxia</span> </strong></p>\n</td>\n<td>\n<p><strong>Very low SvO2</strong></p>\n</td>\n<td>\n<p><strong>Cyanosis ++</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p><strong>4. </strong></p>\n</td>\n<td>\n<p><strong>Histotoxic hypoxia</strong></p>\n</td>\n<td>\n<p><strong>SaO2 is Normal and high SvO2</strong></p>\n</td>\n<td>\n<p><strong>Cyanosis never seen</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What would be the resulting lung volume if the chest wall is excluded and the lung is allowed to undergo elastic recoil?", "options": [{"label": "A", "text": "Minimum volume", "correct": true}, {"label": "B", "text": "Zero", "correct": false}, {"label": "C", "text": "Functional residual capacity", "correct": false}, {"label": "D", "text": "Residual volume", "correct": false}], "correct_answer": "A. Minimum volume", "question_images": [], "explanation_images": [], "explanation": "\n<table>\n<thead>\n<tr>\n<td>\n<p><strong>Lung Volumes</strong></p>\n</td>\n<td>\n<p><strong>Definition</strong></p>\n</td>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n<p>Tidal Volume</p>\n</td>\n<td>\n<p>Volume of air inspired or expired during normal breathing</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Inspiratory Reserve Volume (IRV)</p>\n</td>\n<td>\n<p>Maximum volume of air that can be inspired above <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> volume</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Expiratory Reserve Volume (ERV)</p>\n</td>\n<td>\n<p>Maximum volume of air that can be expired below <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> volume</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Residual Volume (RV)</p>\n</td>\n<td>\n<p>Volume of air remaining in the lungs after <span class=\"customMeta\" data-dictid=\"c678bddb1d1692777192d2ee1ebd92\">maximal</span> expiration</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Inspiratory Capacity</p>\n</td>\n<td>\n<p>Total volume of air that can be inspired after <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> <span class=\"customMeta\" data-dictid=\"2cbabc42d21692777187c451566867\">expiration</span> (TV + IRV)</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Functional <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">Residual</span> Capacity (FRC)</p>\n</td>\n<td>\n<p>Volume of air remaining in the lungs after a normal <span class=\"customMeta\" data-dictid=\"2cbabc42d21692777187c451566867\">expiration</span> (ERV + RV)</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Vital Capacity</p>\n</td>\n<td>\n<p>Maximum volume of air that can be forcefully exhaled after <span class=\"customMeta\" data-dictid=\"c678bddb1d1692777192d2ee1ebd92\">maximal</span> inspiration (TV + <span class=\"customMeta\" data-dictid=\"9cea17d64b16927771905278e8ea88\">IRV</span> + ERV)</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Total Lung Capacity</p>\n</td>\n<td>\n<p>Maximum volume of air the lungs can hold (TV + <span class=\"customMeta\" data-dictid=\"9cea17d64b16927771905278e8ea88\">IRV</span> + <span class=\"customMeta\" data-dictid=\"5a6905fdca16927771879daba1b8d2\">ERV</span> + RV)</p>\n</td>\n</tr>\n</tbody>\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Surfactant is secreted by which of the following?", "options": [{"label": "A", "text": "Type I pneumocyte", "correct": false}, {"label": "B", "text": "Type Il pneumocyte", "correct": true}, {"label": "C", "text": "Sertoli cell", "correct": false}, {"label": "D", "text": "Leydig cell", "correct": false}], "correct_answer": "B. Type Il pneumocyte", "question_images": [], "explanation_images": [], "explanation": "<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The O 2 saturation with respect to PO₂ is marked as A. What happens to the Oxygen Hb dissociation curve upon transfusion of stored RBC?", "options": [{"label": "A", "text": "B", "correct": true}, {"label": "B", "text": "C", "correct": false}, {"label": "C", "text": "D", "correct": false}, {"label": "D", "text": "E", "correct": false}], "correct_answer": "A. B", "question_images": ["https://image.prepladder.com/content/XBB771OTEJjaV8txFlKz1741774793.png"], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:625px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Factor</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Effect on O₂ <span class=\"customMeta\" data-dictid=\"18fb34ab321692777186e9bc95a726\">Dissociation</span> Curve</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Impact</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Low 2,3-BPG</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Leftward shift (B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increased O₂ affinity, <span class=\"customMeta\" data-dictid=\"10c83adb331692777197f775bec1aa\">reduced</span> unloading</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acidosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rightward shift</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Enhances oxygen unloading</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alkalosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Leftward shift</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Increases oxygen binding</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypercapnia (↑ CO₂)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rightward shift</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Enhances oxygen release</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypothermia</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Leftward shift</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Decreases oxygen unloading</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In which of the following situations is the equation V/Q = infinity accurate?", "options": [{"label": "A", "text": "Foreign body obstruction in the bronchus", "correct": false}, {"label": "B", "text": "Equal to dead space", "correct": true}, {"label": "C", "text": "When O2 and CO2 ratio is equal", "correct": false}, {"label": "D", "text": "The PO2 of alveolar air is 159 mmHg and PCO2 is 40 mmHg", "correct": false}], "correct_answer": "B. Equal to dead space", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the subsequent factors experiences an elevation in chronic obstructive pulmonary disease (COPD)? 1. FRC 2. TLC 3. VC 4. FEV1/FVC", "options": [{"label": "A", "text": "1 only", "correct": false}, {"label": "B", "text": "1 and 4", "correct": false}, {"label": "C", "text": "1 and 3", "correct": false}, {"label": "D", "text": "1 and 2", "correct": true}], "correct_answer": "D. 1 and 2", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/MMmpiPJuFnbwr2hG0Ikf1746601233.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\"><strong>Flow-volume parameter</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\"><strong>Obstructive lung disease(e.g.COPD)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\"><strong>Restrictive lung disease</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>RV (Residual Volume)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↑</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>FRC (Functional <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">Residual</span> Capacity)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↑</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>TLC (Total Lung Capacity)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↑</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>FEV₁</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓↓</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>FVC (Forced Vital Capacity)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>FEV₁/FVC Ratio</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">↓</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">Normal or ↑</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Key insight</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">FEV₁ decreased more than FVC</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p style=\"text-align:center\">FEV₁ decreased proportionately to FVC</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Determine the respiratory quotient (RQ) of a patient weighing 50 kg who exhales 200 ml/min of CO 2 and consumed 250 ml/min 02 .", "options": [{"label": "A", "text": "0.8", "correct": true}, {"label": "B", "text": "1", "correct": false}, {"label": "C", "text": "1.25", "correct": false}, {"label": "D", "text": "1.5", "correct": false}], "correct_answer": "A. 0.8", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "During exercise, once a state of balance is achieved, it was observed that the body's oxygen consumption rate was 1500 ml/min. To determine the MET score, consider a baseline oxygen consumption rate of 250 ml/min.", "options": [{"label": "A", "text": "5", "correct": false}, {"label": "B", "text": "6", "correct": true}, {"label": "C", "text": "1/5", "correct": false}, {"label": "D", "text": "1/6", "correct": false}], "correct_answer": "B. 6", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which ion is primarily involved in the function of O2-sensitive channels in peripheral chemoreceptors?", "options": [{"label": "A", "text": "Potassium (K+)", "correct": true}, {"label": "B", "text": "Sodium (Na+)", "correct": false}, {"label": "C", "text": "Bicarbonate (HCO3-)", "correct": false}, {"label": "D", "text": "Chloride (Cl-)", "correct": false}], "correct_answer": "A. Potassium (K+)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Peripheral chemoreceptors are most sensitive to?", "options": [{"label": "A", "text": "Hypercapnia", "correct": false}, {"label": "B", "text": "Hypoxia", "correct": true}, {"label": "C", "text": "Acidosis", "correct": false}, {"label": "D", "text": "Alkalosis", "correct": false}], "correct_answer": "B. Hypoxia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/fw9trWN2MZkr7Tegewse1741774859.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:614px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Stimulus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Effect on <span class=\"customMeta\" data-dictid=\"255674f3271692777195c172d86daf\">Peripheral</span> Chemoreceptors</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypoxia (↓ PaO₂)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Strongest stimulus</strong>, leading to increased ventilation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Hypercapnia (↑ PaCO₂)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Weak response; <span class=\"customMeta\" data-dictid=\"579693a0121692777184c972741ee0\">central chemoreceptors</span> dominate.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Acidosis (↓ pH)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Peripheral response occurs, but <span class=\"customMeta\" data-dictid=\"579693a0121692777184c972741ee0\">central chemoreceptors</span> are more significant.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alkalosis (↑ pH)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Minimal effect; detected mainly by central chemoreceptors.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Physiological dead space?", "options": [{"label": "A", "text": "Can be measured by spirometry", "correct": false}, {"label": "B", "text": "Is lesser than anatomical dead space", "correct": false}, {"label": "C", "text": "Represents inadequately ventilated alveoli", "correct": false}, {"label": "D", "text": "Represents inadequately perfused alveoli", "correct": true}], "correct_answer": "D. Represents inadequately perfused alveoli", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:614px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Concept</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anatomical Dead Space</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Conducting airways where no gas exchange occurs (e.g., trachea, bronchi).</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Alveolar Dead Space</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Alveoli that are ventilated but <strong>not perfused</strong>, contributing to wasted ventilation.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Physiological Dead Space</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sum of <span class=\"customMeta\" data-dictid=\"116f86834a1692777181a914379270\">anatomical</span> and alveolar dead space; reflects ineffective ventilation.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient presents with respiratory difficulty and a history of chronic smoking. Pulmonary function testing shows a decrease in FEV1%. What is the most probable diagnosis?", "options": [{"label": "A", "text": "Chronic Obstructive Pulmonary Disease (COPD)", "correct": true}, {"label": "B", "text": "Pulmonary Fibrosis", "correct": false}, {"label": "C", "text": "Interstitial Lung Disease", "correct": false}, {"label": "D", "text": "Asthma", "correct": false}], "correct_answer": "A. Chronic Obstructive Pulmonary Disease (COPD)", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which among the following has the highest airway resistance?", "options": [{"label": "A", "text": "Alveolar duct", "correct": false}, {"label": "B", "text": "Bronchi", "correct": true}, {"label": "C", "text": "Respiratory bronchioles", "correct": false}, {"label": "D", "text": "Small bronchioles", "correct": false}], "correct_answer": "B. Bronchi", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Carbon monoxide causes which type of hypoxia?", "options": [{"label": "A", "text": "Anemic hypoxia", "correct": true}, {"label": "B", "text": "Hypoxic hypoxia", "correct": false}, {"label": "C", "text": "Stagnant hypoxia", "correct": false}, {"label": "D", "text": "Histotoxic hypoxia", "correct": false}], "correct_answer": "A. Anemic hypoxia", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/jxEJ0KNLfkxGSBGStBBK1745215180.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the marked region in the given spirometry.", "options": [{"label": "A", "text": "Functional residual capacity", "correct": true}, {"label": "B", "text": "Tidal volume", "correct": false}, {"label": "C", "text": "Expiratory reserve volume", "correct": false}, {"label": "D", "text": "Inspiratory reserve volume", "correct": false}], "correct_answer": "A. Functional residual capacity", "question_images": ["https://image.prepladder.com/notes/U3bYWwE9VlTdXxMdNwa31745906236.png"], "explanation_images": ["https://image.prepladder.com/content/NDZfOxHwnGn14hW0tsfT1747629365.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Lung Volume/Capacity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Description</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Typical Volume (mL)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Formula</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Tidal Volume (TV) </strong><strong>(Option B ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Amount of air inhaled or exhaled during normal breath</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>500</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inspiratory Reserve Volume (IRV) </strong><strong>(Option D ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Additional air that can be inhaled after a normal inhalation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3000</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Expiratory Reserve Volume (ERV) </strong><strong>(Option C ruled out)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Additional air that can be exhaled after a normal exhalation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1200</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Residual Volume (RV)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Air remaining in the lungs after a <span class=\"customMeta\" data-dictid=\"c678bddb1d1692777192d2ee1ebd92\">maximal</span> exhalation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1200</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Anatomical Dead Space</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Volume of air in conducting airways where no gas exchange occurs</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>150</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>-</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Total Lung Capacity (TLC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Maximum amount of air the lungs can hold</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>6000</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>TLC = TV + IRV + <span class=\"customMeta\" data-dictid=\"5a6905fdca16927771879daba1b8d2\">ERV</span> + RV</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Vital Capacity (VC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Maximum air exhaled after a <span class=\"customMeta\" data-dictid=\"c678bddb1d1692777192d2ee1ebd92\">maximal</span> inhalation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4800</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>VC = TV + IRV + ERV</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inspiratory Capacity (IC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Maximum air inhaled after a normal exhalation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3500</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>IC = TV + IRV</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Functional <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">Residual</span> Capacity (FRC) </strong><strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Air remaining in the lungs after a normal exhalation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2400</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>FRC = <span class=\"customMeta\" data-dictid=\"5a6905fdca16927771879daba1b8d2\">ERV</span> + RV</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A preterm baby who was delivered at 28 weeks developed respiratory distress syndrome. Which of the following is true about surface tension and compliance in this baby?", "options": [{"label": "A", "text": "Surface tension - decreased; Compliance - increased", "correct": false}, {"label": "B", "text": "Surface tension - increased; Compliance decreased", "correct": true}, {"label": "C", "text": "Both surface tension and compliance decreased", "correct": false}, {"label": "D", "text": "Both surface tension and compliance increased", "correct": false}], "correct_answer": "B. Surface tension - increased; Compliance decreased", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following conditions will shift the oxygen-Hb dissociation curve to the left?", "options": [{"label": "A", "text": "Hypoxia", "correct": false}, {"label": "B", "text": "Hypercarbia", "correct": false}, {"label": "C", "text": "Alkalosis", "correct": true}, {"label": "D", "text": "Increase in 2,3-DPG", "correct": false}], "correct_answer": "C. Alkalosis", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In the lungs, which type of cells are responsible for the secretion of surfactant?", "options": [{"label": "A", "text": "Type 1 pneumocyte", "correct": false}, {"label": "B", "text": "Alveolar macrophage", "correct": false}, {"label": "C", "text": "Dust cells", "correct": false}, {"label": "D", "text": "Type 2 pneumocyte", "correct": true}], "correct_answer": "D. Type 2 pneumocyte", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following methods is used for calculation of anatomical dead space ?", "options": [{"label": "A", "text": "Multiple breath nitrogen test", "correct": false}, {"label": "B", "text": "Bohr’s method", "correct": false}, {"label": "C", "text": "Spirometry", "correct": false}, {"label": "D", "text": "Single breath nitrogen test", "correct": true}], "correct_answer": "D. Single breath nitrogen test", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - Single breath <span class=\"customMeta\" data-dictid=\"391d32291016927771932bab695579\">nitrogen</span> test: \n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What would be the least likely condition to happen if a group of colleagues took an excursion to a high altitude-mountain region?", "options": [{"label": "A", "text": "Increase PaO2", "correct": true}, {"label": "B", "text": "Increase in RBC &amp; Hb", "correct": false}, {"label": "C", "text": "Increased mitochndria", "correct": false}, {"label": "D", "text": "Hyperventilation", "correct": false}], "correct_answer": "A. Increase PaO2", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Increase PaO2: \n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Adequate oxygen delivery at cellular level is present in which type of hypoxia ?", "options": [{"label": "A", "text": "Anemic", "correct": false}, {"label": "B", "text": "Stagnant", "correct": false}, {"label": "C", "text": "Hypoxic", "correct": false}, {"label": "D", "text": "Histotoxic", "correct": true}], "correct_answer": "D. Histotoxic", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - H\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Adequate O 2 oxygen delivery at cellular level occurs in which type of hypoxia?", "options": [{"label": "A", "text": "Hypoxic", "correct": false}, {"label": "B", "text": "Anaemic", "correct": false}, {"label": "C", "text": "Stagnant", "correct": false}, {"label": "D", "text": "Histotoxic", "correct": true}], "correct_answer": "D. Histotoxic", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - H\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: center;\"><strong>Type of Hypoxia</strong></p>\n</td>\n<td>\n<p style=\"text-align: center;\"><strong>Cause</strong></p>\n</td>\n<td>\n<p style=\"text-align: center;\"><strong>Description</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Hypoxic Hypoxia</p>\n</td>\n<td>\n<p>Decreased inspired oxygen or impaired gas exchange in lungs</p>\n</td>\n<td>\n<p>Insufficient <span class=\"customMeta\" data-dictid=\"c07e2d09e9169277719405252db970\">oxygen tension</span> in arterial blood</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Anaemic Hypoxia</p>\n</td>\n<td>\n<p>Decreased oxygen-carrying capacity of blood</p>\n</td>\n<td>\n<p>Reduced <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> levels or <span class=\"customMeta\" data-dictid=\"458e050fdc16927771809854c9fd53\">abnormal</span> <span class=\"customMeta\" data-dictid=\"ad2073fe6716927771885f3c1ec652\">hemoglobin</span> function</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Stagnant Hypoxia</p>\n</td>\n<td>\n<p>Impaired blood circulation</p>\n</td>\n<td>\n<p>Reduced <span class=\"customMeta\" data-dictid=\"82cc227a1c169277718387905b50c6\">blood flow</span> to tissues</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Histotoxic Hypoxia</p>\n</td>\n<td>\n<p>Cellular inability to utilize oxygen</p>\n</td>\n<td>\n<p>Disruption in the <span class=\"customMeta\" data-dictid=\"12a6f23332169277718402ca6703e2\">cellular</span> <span class=\"customMeta\" data-dictid=\"d92cbff33316927771927b4de10a5b\">metabolic</span> process</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following breathing patterns have prolonged inspiratory spasms that resemble breath-holding ?", "options": [{"label": "A", "text": "Biot breathing", "correct": false}, {"label": "B", "text": "Apneustic breathing", "correct": true}, {"label": "C", "text": "Cheyne stokes breathing", "correct": false}, {"label": "D", "text": "Kussmaul breathing", "correct": false}], "correct_answer": "B. Apneustic breathing", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - Apneustic breathing: \n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Functional residua l capacity is:", "options": [{"label": "A", "text": "Volume expired after normal inspiration", "correct": false}, {"label": "B", "text": "Volume that remains after forced expiration", "correct": false}, {"label": "C", "text": "Expiratory reserve volume + residual volume", "correct": true}, {"label": "D", "text": "Tidal volume + inspiratory reserve volume", "correct": false}], "correct_answer": "C. Expiratory reserve volume + residual volume", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Expiratory reserve volume + <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">residual</span> volume: \n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align: center;\"><strong>Lung Volume/Capacity</strong></p>\n</td>\n<td>\n<p style=\"text-align: center;\"><strong>Description</strong></p>\n</td>\n<td>\n<p style=\"text-align: center;\"><strong>Typical Value (in adults)</strong></p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Tidal Volume (TV)</p>\n</td>\n<td>\n<p>Volume of air inhaled or exhaled during normal breathing</p>\n</td>\n<td>\n<p>500 mL</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Inspiratory Reserve Volume (IRV)</p>\n</td>\n<td>\n<p>Additional volume of air that can be inhaled after a normal <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> inspiration</p>\n</td>\n<td>\n<p>2,500-3,000 mL</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Expiratory Reserve Volume (ERV)</p>\n</td>\n<td>\n<p>Additional volume of air that can be exhaled after a normal <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> expiration</p>\n</td>\n<td>\n<p>1,000-1,200 mL</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Residual Volume (RV)</p>\n</td>\n<td>\n<p>Volume of air remaining in the lungs after <span class=\"customMeta\" data-dictid=\"c678bddb1d1692777192d2ee1ebd92\">maximal</span> expiration</p>\n</td>\n<td>\n<p>1,200-1,300 mL</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Total Lung Capacity (TLC)</p>\n</td>\n<td>\n<p>Maximum volume of air the lungs can hold, including inspiratory reserve volume, <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> volume, <span class=\"customMeta\" data-dictid=\"632c0c215816927771878b6e818a11\">expiratory</span> reserve volume, and <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">residual</span> volume</p>\n</td>\n<td>\n<p>5,000-6,000 mL</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Vital Capacity (VC)</p>\n</td>\n<td>\n<p>Maximum volume of air that can be exhaled after a <span class=\"customMeta\" data-dictid=\"c678bddb1d1692777192d2ee1ebd92\">maximal</span> inspiration, including inspiratory reserve volume, <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> volume, and <span class=\"customMeta\" data-dictid=\"632c0c215816927771878b6e818a11\">expiratory</span> reserve volume</p>\n</td>\n<td>\n<p>4,500-5,000 mL</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Functional <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">Residual</span> Capacity (FRC)</p>\n</td>\n<td>\n<p>Volume of air remaining in the lungs after a normal <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> expiration, including <span class=\"customMeta\" data-dictid=\"632c0c215816927771878b6e818a11\">expiratory</span> reserve volume and <span class=\"customMeta\" data-dictid=\"a459f313d9169277719789fdfb7ada\">residual</span> volume</p>\n</td>\n<td>\n<p>2,400-2,800 mL</p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Inspiratory Capacity (IC)</p>\n</td>\n<td>\n<p>Maximum volume of air that can be inhaled after a normal <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> expiration, including <span class=\"customMeta\" data-dictid=\"9de1765e531692777200d737a38c98\">tidal</span> volume and inspiratory reserve volume</p>\n</td>\n<td>\n<p>3,500-3,800 mL</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "During forceful expiration, which type of neurons primarily exhibit increased firing ?", "options": [{"label": "A", "text": "Dorsal group of neurons", "correct": false}, {"label": "B", "text": "Caudal Ventral group of neurons", "correct": true}, {"label": "C", "text": "Pneumotaxic center", "correct": false}, {"label": "D", "text": "Apneustic center", "correct": false}], "correct_answer": "B. Caudal Ventral group of neurons", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - <span class=\"customMeta\" data-dictid=\"a49829e8ef1692777183bc64f40412\">Caudal</span> <span class=\"customMeta\" data-dictid=\"9ccb2fd2f31692777201e231bfda74\">Ventral</span> group of neu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "What is the affinity of carbon monoxide to hemoglobin in comparison to oxygen ?", "options": [{"label": "A", "text": "100", "correct": false}, {"label": "B", "text": "4", "correct": false}, {"label": "C", "text": "250", "correct": true}, {"label": "D", "text": "150", "correct": false}], "correct_answer": "C. 250", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - 250: \n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "V/Q = infinity means ____________", "options": [{"label": "A", "text": "Partial pressure of O2 becomes zero", "correct": false}, {"label": "B", "text": "No exchange of O2 &amp; CO2", "correct": true}, {"label": "C", "text": "CO2 alone equilibrates with the venous blood", "correct": false}, {"label": "D", "text": "Partial pressure of both CO2 and O2 remain normal", "correct": false}], "correct_answer": "B. No exchange of O2 & CO2", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option B - No exchange of O2 &amp; CO2\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Pacemaker generating the rhythm for breathing is ______________", "options": [{"label": "A", "text": "Pneumotaxic centre", "correct": false}, {"label": "B", "text": "Dorsal group of neurons in the medulla", "correct": false}, {"label": "C", "text": "Pre-Botziger complex", "correct": true}, {"label": "D", "text": "Apneustic centre", "correct": false}], "correct_answer": "C. Pre-Botziger complex", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option C - Pre-Botzig\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Single breath nitrogen method is used for measuring _____________", "options": [{"label": "A", "text": "Physiological dead space volume", "correct": false}, {"label": "B", "text": "Residual volume", "correct": false}, {"label": "C", "text": "Tidal volume", "correct": false}, {"label": "D", "text": "Anatomical dead space volume", "correct": true}], "correct_answer": "D. Anatomical dead space volume", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option D - <span class=\"customMeta\" data-dictid=\"116f86834a1692777181a914379270\">Anatomical</span> dead space volu\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 44 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 52-year-old male, non-smoker, presents with progressive shortness of breath, persistent dry cough, and chest pain. A CT scan reveals a peripheral mass in the lower lobe of left lung, and a biopsy of the nodule demonstrates a glandular pattern with mucinous differentiation, as shown in the image below. Which of the following markers is least likely to be positive in this patient's lung lesion?", "options": [{"label": "A", "text": "TTF-1 (Thyroid Transcription Factor-1)", "correct": false}, {"label": "B", "text": "MUC1", "correct": false}, {"label": "C", "text": "Napsin A", "correct": false}, {"label": "D", "text": "Chromogranin", "correct": true}], "correct_answer": "D. Chromogranin", "question_images": ["https://image.prepladder.com/content/HgPkUhHTymlH8e8W2NoK1737008307.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/KEwbDhkO2k4GICXcKDtr1740664872.mp3", "video": ""}, {"text": "Which of the following is not an IHC marker for small-cell lung carcinoma?", "options": [{"label": "A", "text": "Napsin A", "correct": true}, {"label": "B", "text": "Chromogranin", "correct": false}, {"label": "C", "text": "NSE", "correct": false}, {"label": "D", "text": "CD56", "correct": false}], "correct_answer": "A. Napsin A", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 56-year-old male presents with persistent shoulder pain radiating to the ulnar aspect of the forearm and progressive weakness in his right hand. Examination reveals muscle wasting in the right hand. Imaging of the chest shows a mass at the apex of the right lung involving nearby neurovascular structures. Which syndrome is most likely associated with this presentation?", "options": [{"label": "A", "text": "Horner syndrome", "correct": true}, {"label": "B", "text": "Superior vena cava (SVC) syndrome", "correct": false}, {"label": "C", "text": "Caplan syndrome", "correct": false}, {"label": "D", "text": "Carcinoid syndrome", "correct": false}], "correct_answer": "A. Horner syndrome", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old woman has an incidental finding of a lung mass on imaging. CT scan reveals a well-circumscribed lesion with calcifications. Biopsy revealed spindle and epithelioid cells with an eosinophilic cytoplasm, perivascular growth, and positive HMB-45 staining. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Pulmonary hamartoma", "correct": false}, {"label": "B", "text": "Sugar tumour (PEComa)", "correct": true}, {"label": "C", "text": "Solitary fibrous tumour", "correct": false}, {"label": "D", "text": "Carcinoid tumour", "correct": false}], "correct_answer": "B. Sugar tumour (PEComa)", "question_images": ["https://image.prepladder.com/content/OBsvAAWdbbNgaDD7emif1737008748.png"], "explanation_images": ["https://image.prepladder.com/content/fRUWzB5hFc1ix0lnxDGM1737008763.png", "https://image.prepladder.com/content/dUMSClsUIe4NBYXf90Wv1737008791.png", "https://image.prepladder.com/content/ApxK3mqA326lulKSegX81737008848.png", "https://image.prepladder.com/content/rrMk1jPBGJSyg9yGUNu11737487924.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/m4VrQdS5Ndfkagu544vK1740665812.mp3", "video": ""}, {"text": "A 55-year-old former shipyard worker presents with progressive dyspnea and left-sided chest pain for three months. He has a history of occupational asbestos exposure. Physical examination reveals decreased breath sounds over the left lung base. Imaging shows left-sided pleural thickening and effusion. Biopsy confirms mesothelioma. Which of the following statements is not accurate about mesothelioma and adenocarcinoma following asbesto exposure?", "options": [{"label": "A", "text": "Adenocarcinoma often has a shorter latency period compared to mesothelioma following asbestos exposure.", "correct": false}, {"label": "B", "text": "Mesothelioma under electron microscopy, reveals short, non-branching microvilli.", "correct": true}, {"label": "C", "text": "Mesothelioma often presents with positive staining for calretinin and WT-1.", "correct": false}, {"label": "D", "text": "Adenocarcinoma is commonly associated with EGFR mutation.", "correct": false}], "correct_answer": "B. Mesothelioma under electron microscopy, reveals short, non-branching microvilli.", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:720px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Malignant mesothelioma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Adenocarcinoma lung</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Arises from mesothelial cells lining the pleura.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Arises from <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> epithelial cells.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Association with <span class=\"customMeta\" data-dictid=\"92cc1e1acb1692777182aee908c1fd\">asbestos</span> exposure</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Most specific tumours due to <span class=\"customMeta\" data-dictid=\"92cc1e1acb1692777182aee908c1fd\">asbestos</span> exposure</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>M/C <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">carcinoma</span> in <span class=\"customMeta\" data-dictid=\"92cc1e1acb1692777182aee908c1fd\">asbestos</span> exposure.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Latency period</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>25-45 years after <span class=\"customMeta\" data-dictid=\"92cc1e1acb1692777182aee908c1fd\">asbestos</span> exposure</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>10-30 years after <span class=\"customMeta\" data-dictid=\"92cc1e1acb1692777182aee908c1fd\">asbestos</span> exposure<strong> </strong><strong>(Option A)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Specific genetic mutations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>NF2, BAP1, <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 9p deletion</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>EGFR, ALK, KRAS <strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathological features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Epithelioid, sarcomatoid, or <span class=\"customMeta\" data-dictid=\"d2d6148c9e16927771833a65ad15d2\">biphasic</span> patterns</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Various growth patterns, <span class=\"customMeta\" data-dictid=\"c2f9d01ba91692777188d264244b6a\">glandular</span> differentiation</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunohistochemistry</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Keratin, Calretinin, WT-1 <strong>(Option C), </strong>cytokeratin 5/6, podoplanin</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thyroid <span class=\"customMeta\" data-dictid=\"739aa4b5ea1692777200a636ee075f\">transcription</span> factor-1 (TTF-1)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron microscopy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Long, slender, branching <span class=\"customMeta\" data-dictid=\"4087852c1e1692777192e866353a05\">microvilli</span> <strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Short and non-branching microvilli</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presents with pleuritic chest pain and a pleural-based mass observed on imaging studies. Histopathological examination of a biopsy from the mass reveals spindle-shaped cells within a collagenous stroma. Which immunohistochemical marker would be most useful in differentiating solitary fibrous tumour (SFT) from mesothelioma?", "options": [{"label": "A", "text": "CD34", "correct": true}, {"label": "B", "text": "Calretinin", "correct": false}, {"label": "C", "text": "WT1", "correct": false}, {"label": "D", "text": "TTF-1 (Thyroid transcription factor 1)", "correct": false}], "correct_answer": "A. CD34", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/hdIllrfurOkFeh5B8TBc1737008675.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:738px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Solitary <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">Fibrous</span> Tumor (SFT)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p style=\"text-align: center;\"><strong>Malignant Mesothelioma</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p><strong>Nature of the tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Mostly benign, rare malignant</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:middle\">\n<p>Malignant</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Histopathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dense <span class=\"customMeta\" data-dictid=\"5d6dfa73b316927772028f3cd60f7f\">fibrous</span> tissue, <span class=\"customMeta\" data-dictid=\"fc5f7fef0e169277719952d19a4532\">spindle</span> cells, occasional cysts</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Diffuse, <span class=\"customMeta\" data-dictid=\"1c5272ad3d1692777190e71409d07a\">invasive</span> tumour growth across the pleural surface</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Immunohistochemistry</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Positive for CD34 and STAT6.</li>\n<li>Negative for Keratin.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Positive for Calretinin, WT1, <span class=\"customMeta\" data-dictid=\"bc3875332b1692777185e2c8163a73\">cytokeratin</span> 5/6, and podoplanin.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Morphology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Tumours, often <span class=\"customMeta\" data-dictid=\"164f4942281692777195e900724cc3\">pedunculated</span> and attached to the pleural surface, may have a whorled appearance.</p>\n<img alt=\"\" data-author=\"Adrien Daigeler,Lehnhardt Marcus,Scott Langer,Lars Steinsträsser,Hans Ulrich Steinau,Thomas Mentzel,Cornelius Kuhnen\" data-hash=\"\" data-license=\"CC BY 2.0\" data-source=\"https://www.researchgate.net/figure/Macroscopic-aspect-of-SFT-Macroscopic-aspect-of-a-solitary-fibrous-tumor-cut-surface-of_fig3_6961315\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/hdIllrfurOkFeh5B8TBc1737008675.png\" width=\"1412\"/><br/>\n\t\t\t </td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Thick, firm, <span class=\"customMeta\" data-dictid=\"be6fe9c6c316927771889dbaaf2b89\">gelatinous</span> tissue ensheathing the lung; often extensive effusion.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Microscopic appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Spindle cells are arranged in whorls among <span class=\"customMeta\" data-dictid=\"059559ce5d16927771975852f6a8ed\">reticulin</span> and <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> fibres.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Variable<strong>:</strong><strong> </strong>Epithelioid (tubular/papillary structures), <span class=\"customMeta\" data-dictid=\"4a49c5515016927771986bfa538161\">sarcomatoid</span> (fibrosarcoma-like), or biphasic</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old nonsmoking woman presents with a persistent cough and hemoptysis. Imaging reveals a solitary pulmonary nodule in the right lung. Biopsy shows cells with neuroendocrine features, including round to oval nuclei, stippled chromatin, and abundant granular cytoplasm arranged in nests and trabeculae. Which cell type is most likely involved in the origin of this patient's lung tumour?", "options": [{"label": "A", "text": "Type II pneumocytes", "correct": false}, {"label": "B", "text": "Clara cells", "correct": false}, {"label": "C", "text": "Kulchitsky cells", "correct": true}, {"label": "D", "text": "Alveolar macrophages", "correct": false}], "correct_answer": "C. Kulchitsky cells", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old female presents with a chronic cough and recurrent episodes of wheezing. Bronchoscopy reveals a \"coat button lesion\" within the bronchus, as shown in the image. Biopsy of the lesion shows nesting of cells with uniform round nuclei and moderate eosinophilic cytoplasm. What is the most likely diagnosis based on the described features?", "options": [{"label": "A", "text": "Small cell lung carcinoma", "correct": false}, {"label": "B", "text": "Squamous cell carcinoma", "correct": false}, {"label": "C", "text": "Bronchial carcinoid tumor", "correct": true}, {"label": "D", "text": "Adenocarcinoma", "correct": false}], "correct_answer": "C. Bronchial carcinoid tumor", "question_images": ["https://image.prepladder.com/content/NEbblDwG0kF460lY22lZ1737008566.png"], "explanation_images": ["https://image.prepladder.com/content/L19gNMcf6fSUNxmOnqwQ1731496610.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:722px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Characteristic</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Small Cell Carcinoma</strong><br/>\n<strong>(Option A)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Squamous Cell Carcinoma</strong><br/>\n<strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Carcinoid Tumor </strong><br/>\n<strong>(Option C)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Adenocarcinoma</strong><br/>\n<strong>(Option D)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Origin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neuroendocrine cells of the lung.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Squamous cells of the lung.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Neuroendocrine cells of bronchial epithelium.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glandular cells of the lung.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Cells in histopathology</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small, round to oval, blue cells with scant <span class=\"customMeta\" data-dictid=\"728bb228361692777185b98c34534b\">cytoplasm</span> and finely <span class=\"customMeta\" data-dictid=\"4f63eb15be169277718848d4b4978b\">granular</span> <span class=\"customMeta\" data-dictid=\"77399c6ee0169277718492fb8fd58f\">chromatin</span> with a “salt and pepper” appearance.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Sheets of polygonal cells with keratinisation and <span class=\"customMeta\" data-dictid=\"021501f2831692777190ef9ba827fb\">intercellular</span> bridges</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Nesting (organoid) growth pattern with uniform round nuclei, moderate <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> cytoplasm, and a “salt-and-pepper” <span class=\"customMeta\" data-dictid=\"77399c6ee0169277718492fb8fd58f\">chromatin</span> pattern.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Glandular or epithelial cells forming acinar, papillary, or solid patterns</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mitotic rate</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>High</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Variable</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low to moderate</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Variable</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Electron <span class=\"customMeta\" data-dictid=\"51df8cdfc91692777192aa76f4de51\">microscopy</span> findings</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dense core <span class=\"customMeta\" data-dictid=\"f9f635c47c16927771934f75253045\">neurosecretory</span> granules.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Desmosomes, tonofilaments, keratinisation</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Dense core <span class=\"customMeta\" data-dictid=\"f9f635c47c16927771934f75253045\">neurosecretory</span> granules.</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Variable organelles, sometimes containing <span class=\"customMeta\" data-dictid=\"7d30ef9aee16927771936bdac2c1ff\">mucin</span> vacuoles</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>IHC markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive for <span class=\"customMeta\" data-dictid=\"7eca2476201692777193e0a0959bd7\">neuroendocrine</span> markers (e.g., chromogranin, synaptophysin).</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>P63, p40, CK5/6</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Positive for <span class=\"customMeta\" data-dictid=\"7eca2476201692777193e0a0959bd7\">neuroendocrine</span> markers (e.g., chromogranin, synaptophysin)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Variable (e.g., TTF-1, Napsin A for primary lung adenocarcinoma)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old heavy smoker presents with a persistent cough and unintentional weight loss. Imaging shows a right lung mass with mediastinal lymphadenopathy. Biopsy reveals small, round cells with scant cytoplasm and nuclei exhibiting a salt-and-pepper chromatin pattern. Immunohistochemistry (IHC) is positive for neuroendocrine markers. Which of the following features is incorrectly associated with this clinical condition?", "options": [{"label": "A", "text": "Both glandular and squamous differentiation are seen", "correct": true}, {"label": "B", "text": "Encrustation of tumour cells along the blood vessels with DNA material", "correct": false}, {"label": "C", "text": "Presence of dense neurosecretory granules on electron microscopy", "correct": false}, {"label": "D", "text": "High proliferative index", "correct": false}], "correct_answer": "A. Both glandular and squamous differentiation are seen", "question_images": ["https://image.prepladder.com/content/Yuzzih3OTGyBY1XdUIOr1737008370.png"], "explanation_images": ["https://image.prepladder.com/content/wQjfca6xM01Z8fYsHGpE1737008437.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presents progressive shortness of breath, especially on exertion, fatigue, and ankle swelling. Physical examination reveals elevated jugular venous pressure. Echocardiography shows right ventricular hypertrophy and elevated pulmonary artery pressure. Which of the following conditions can predispose her to this condition?", "options": [{"label": "A", "text": "High altitude", "correct": false}, {"label": "B", "text": "Recurrent thromboembolic", "correct": false}, {"label": "C", "text": "Scleroderma", "correct": false}, {"label": "D", "text": "All the above", "correct": true}], "correct_answer": "D. All the above", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/B7wziVPYqDzGoxcNEWhM1737456898.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 59-year-old heavy smoker presents with loss of appetite and a persistent cough for the past few months. Imaging reveals a central lung mass involving the right bronchus and mediastinal lymph nodes. Immunohistochemical staining of a lung mass biopsy is positive for chromogranin and synaptophysin. Which set of genes is most likely involved in the underlying pathology of this patient's condition? P53 RB L-myc", "options": [{"label": "A", "text": "1, 2", "correct": false}, {"label": "B", "text": "1, 2, 3", "correct": true}, {"label": "C", "text": "Only 2", "correct": false}, {"label": "D", "text": "2, 3", "correct": false}], "correct_answer": "B. 1, 2, 3", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 57-year-old male smoker with a persistent cough and weight loss is found to have a lung mass on imaging. The biopsy showed keratin pearls and intercellular bridges. Which of the following paraneoplastic syndromes is highly associated with this diagnosis?", "options": [{"label": "A", "text": "Hypercalcemia", "correct": true}, {"label": "B", "text": "Syndrome of Inappropriate Antidiuretic Hormone Secretion (SIADH)", "correct": false}, {"label": "C", "text": "Migratory thrombophlebitis", "correct": false}, {"label": "D", "text": "Cushing's syndrome", "correct": false}], "correct_answer": "A. Hypercalcemia", "question_images": ["https://image.prepladder.com/content/96lAraqCT3uPuVUE3oEP1737008204.png"], "explanation_images": ["https://image.prepladder.com/content/KBJi3WdyiPID3zBixAlA1737483698.png", "https://image.prepladder.com/content/2WFJSBExSpe0zjBfkJ451737483747.png", "https://image.prepladder.com/content/Wd5C8h3W7BEkTcqFuc511737483795.png"], "explanation": "<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:627px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Type of Lung Carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Paraneoplastic Syndrome</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Squamous cell carcinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Hypercalcemia</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Adenocarcinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Migratory <span class=\"customMeta\" data-dictid=\"31f2c60d1e1692777200a4eae70af9\">thrombophlebitis</span> (<strong>Trousseau syndrome</strong>)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Small cell or <span class=\"customMeta\" data-dictid=\"3d2453376b16927771947134f6a67d\">oat</span> cell Carcinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>SIADH (syndrome of inappropriate anti-diuretic hormone secretion)</li>\n<li>Cushing's syndrome</li>\n<li>Lambert eaton syndrome</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Large cell carcinoma</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Gynaecomastia</p>\n</td>\n</tr>\n</tbody>\n\n<table align=\"center\" cellspacing=\"0\" style=\"border-collapse:collapse; width:789px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Trousseau syndrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Trousseau sign </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Troisier’s sign or Virchow node</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Characterized by the elevated risk of <span class=\"customMeta\" data-dictid=\"237b2a1dfa1692777200a074fd1072\">thromboembolism</span> in advanced cancers, driven by tumour-associated inflammation, <span class=\"customMeta\" data-dictid=\"42f1e4deb8169277718412c0681a54\">coagulation</span> factors (such as tissue factor and factor VIII), and procoagulants like <span class=\"customMeta\" data-dictid=\"7d30ef9aee16927771936bdac2c1ff\">mucin</span> released by tumour cells.</p>\n<p><img alt=\"\" data-author=\"Esther Jane Punithakumar,Avik Panigrahi,Abheek Sil,Dibyendu Bikash Bhanja,Surajit Kumar Biswas\" data-hash=\"\" data-license=\"Elsevier\" data-source=\"https://www.surgjournal.com/article/S0039-6060%2820%2930619-X/abstract\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/KBJi3WdyiPID3zBixAlA1737483698.png\" width=\"1911\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Carpopedal spasms, which are <span class=\"customMeta\" data-dictid=\"42b110efe11692777190ea5720c867\">involuntary</span> muscle contractions of the hand and wrist, can occur when a <span class=\"customMeta\" data-dictid=\"263ee5444e1692777183a7e8e704da\">blood pressure</span> <span class=\"customMeta\" data-dictid=\"074fda92471692777185c9d613a2ea\">cuff</span> restricts <span class=\"customMeta\" data-dictid=\"337d16dac5169277718474b97f6e4a\">circulation</span> to the <span class=\"customMeta\" data-dictid=\"5ff25303a01692777186731f6a4f5c\">distal</span> arm for several minutes. This phenomenon is indicative of hypocalcemia.</p>\n<p><img alt=\"\" data-author=\"Tmdswan\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Trousseau%27s_Sign_of_Latent_Tetany.jpg\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/2WFJSBExSpe0zjBfkJ451737483747.png\" width=\"1564\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Refers to a palpable, enlarged left <span class=\"customMeta\" data-dictid=\"53765334f31692777199cf434360de\">supraclavicular</span> <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> <span class=\"customMeta\" data-dictid=\"b10ce4acbf169277719323ffd12306\">node</span> and is a clinical indicator of metastatic cancer, suggesting the spread of the tumour to the <span class=\"customMeta\" data-dictid=\"53765334f31692777199cf434360de\">supraclavicular</span> <span class=\"customMeta\" data-dictid=\"4df97a6cbf169277719172fd1af767\">lymph</span> nodes.</p>\n<p><img alt=\"\" data-author=\"Suneet Sood \" data-hash=\"\" data-license=\"NA\" data-source=\"https://clinipedia.wordpress.com/2013/08/21/troisiers-sign-virchows-node/#comments\" data-tags=\"\" height=\"908\" src=\"https://image.prepladder.com/content/Wd5C8h3W7BEkTcqFuc511737483795.png\" width=\"1199\"/></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/WXm9PinuJTl44QRKyA721746451693.mp3", "video": ""}, {"text": "A 67-year-old male smoker presents with a persistent cough and weight loss. Imaging reveals a lung mass in the upper lobe of the right lung. The biopsy reveals typical features, including keratin pearls, intercellular bridges, and nests of malignant squamous cells with abundant eosinophilic cytoplasm. Based on this scenario, which of the following statements is incorrect?", "options": [{"label": "A", "text": "Keratin pearls are not seen in poorly differentiated squamous cell carcinoma.", "correct": false}, {"label": "B", "text": "p40 is the best marker for squamous cell carcinoma.", "correct": false}, {"label": "C", "text": "Squamous dysplasia is a precursor lesion of squamous cell carcinoma", "correct": false}, {"label": "D", "text": "The squamous cell carcinoma described is likely a peripheral lung lesion.", "correct": true}], "correct_answer": "D. The squamous cell carcinoma described is likely a peripheral lung lesion.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/h3CLnc2mZwz2r6xy1vZ11737007955.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 58-year-old male smoker presents with a persistent cough and mild shortness of breath. Chest imaging reveals a solitary pulmonary nodule. A biopsy is performed, and a histopathological examination of the lung tissue is shown in the image below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Carcinoma in situ", "correct": false}, {"label": "B", "text": "Adenomatous hyperplasia", "correct": false}, {"label": "C", "text": "Adenocarcinoma in situ", "correct": true}, {"label": "D", "text": "Diffuse idiopathic pulmonary neuroendocrine cell hyperplasia", "correct": false}], "correct_answer": "C. Adenocarcinoma in situ", "question_images": ["https://image.prepladder.com/content/vZHvPYuxlOqlSDHbmlI21737007631.png"], "explanation_images": ["https://image.prepladder.com/content/f7xDBQRASm1e8TIYe2XI1737007650.png", "https://image.prepladder.com/content/uJyggYoXHoKYebeE4bIi1737007802.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male smoker presents to the clinic with chronic cough and hemoptysis. He has been smoking two packs of cigarettes per day for the past 30 years. Upon further evaluation, a biopsy reveals lung carcinoma. Which of the following statements regarding risk factors for lung carcinoma is false?", "options": [{"label": "A", "text": "Smoking is a major risk factor for squamous cell carcinoma of the lung.", "correct": false}, {"label": "B", "text": "Smoking has no association with adenocarcinoma of the lung.", "correct": true}, {"label": "C", "text": "Smoking is a significant risk factor for small-cell lung carcinoma.", "correct": false}, {"label": "D", "text": "Asbestosis exposure, along with smoking, multiplies the risk of lung cancer.", "correct": false}], "correct_answer": "B. Smoking has no association with adenocarcinoma of the lung.", "question_images": [], "explanation_images": [], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man presents with severe shortness of breath, cough, and fever after recent bacterial pneumonia. Physical examination shows tachypnea, hypoxia, and diffuse crackles on chest auscultation. Chest X-ray reveals bilateral opacities suggestive of pulmonary oedema. Histopathological examination of lung biopsy shows congested, edematous lungs with inflammation. Which histopathological finding is characteristic of the acute exudative stage in this patient's lung injury?", "options": [{"label": "A", "text": "Proliferation of type II pneumocytes", "correct": false}, {"label": "B", "text": "Formation of fibrotic thickening in the alveolar septa", "correct": false}, {"label": "C", "text": "Presence of waxy hyaline membranes lining the alveolar walls", "correct": true}, {"label": "D", "text": "Resolution of granulation tissue in the alveolar spaces", "correct": false}], "correct_answer": "C. Presence of waxy hyaline membranes lining the alveolar walls", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/XuwOUnAvcKfV1IP2kKdv1737007546.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:568px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Stage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Features</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>1. <span class=\"customMeta\" data-dictid=\"4cdc8161f71692777180df58cafa93\">Acute</span> <span class=\"customMeta\" data-dictid=\"8388ec88871692777187acdf19cc80\">Exudative</span> Stage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Lungs appear heavy, firm, red, and boggy.</li>\n<li>Manifestations include <strong>congestion, <span class=\"customMeta\" data-dictid=\"f46ba26d111692777190def3b1d80a\">interstitial</span> and intra-alveolar oedema,</strong> inflammation, <span class=\"customMeta\" data-dictid=\"18c2380be716927772020c9b2863de\">fibrin</span> deposition, and <strong>diffuse alveolar damage.</strong></li>\n<li>Alveolar walls are lined with <strong>“waxy <span class=\"customMeta\" data-dictid=\"a2ce88e8a0169277718988f5bc31b8\">hyaline</span> membranes” </strong>composed of fibrin-rich oedema fluid mixed with remnants of necrotic epithelial cells.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>2. Proliferative or Organizing Stage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Proliferation of <span class=\"customMeta\" data-dictid=\"bd04ba63bc1692777201f54e0ee060\">Type II</span> pneumocytes.</li>\n<li>Granulation tissue forms in the alveolar walls and spaces.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>3. Late Fibrotic Stage</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Fibrotic thickening of alveolar septa</strong> indicates persistent <strong>fibrosis</strong> and <strong>scarring</strong> that may develop in some cases of lung injury.</li>\n</ul>\n<p> </p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/J7gKZlcaIF3HDrHOLyJj1745347020.mp3", "video": ""}, {"text": "Which of the following statements regarding the pathogenesis sequence of non-cardiogenic pulmonary oedema (NCPE) and acute respiratory distress syndrome (ARDS) is incorrect? Endothelial activation is the hallmark of pathogenesis. Release of cytokines by alveolar epithelial cells Macrophage activation resulting in the release of IL-8 and TNF Recruitment of lymphocytes by IL-8", "options": [{"label": "A", "text": "1 and 3", "correct": false}, {"label": "B", "text": "1, 2 and 3", "correct": false}, {"label": "C", "text": "2 and 4", "correct": true}, {"label": "D", "text": "1 and 4", "correct": false}], "correct_answer": "C. 2 and 4", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/kyt6z1Kp7QPjNKEOv8RG1737481327.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents with progressive shortness of breath and fatigue. On examination, she has elevated jugular venous pressure and a loud pulmonary component of the second heart sound. Echocardiography reveals right ventricular hypertrophy and dilation. Which of the following statements is correct regarding the vascular changes of this condition?", "options": [{"label": "A", "text": "BMPR2 mutations result in endothelial and vascular smooth muscle cell apoptosis.", "correct": false}, {"label": "B", "text": "Classic atherosclerotic changes are commonly observed in pulmonary arteries.", "correct": false}, {"label": "C", "text": "Plexiform lesions are early changes of pulmonary hypertension.", "correct": false}, {"label": "D", "text": "Pulmonary arterioles show medial hypertrophy and intimal fibrosis, narrowing the lumens.", "correct": true}], "correct_answer": "D. Pulmonary arterioles show medial hypertrophy and intimal fibrosis, narrowing the lumens.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/aaO1KOhNdQH8jX6Ypvk81737007324.png", "https://image.prepladder.com/content/UHEttqFiXgs0n7zxPfIh1737007379.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 28 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Which immunologic abnormalities are observed in the local milieu of sarcoid granulomas?", "options": [{"label": "A", "text": "Accumulation of CD8+ T cells and increased CD8/CD4 T-cell ratio", "correct": false}, {"label": "B", "text": "Oligoclonal expansion of B-cell subsets", "correct": false}, {"label": "C", "text": "Increased levels of Th1 cytokines such as IL-4 and IL-10", "correct": false}, {"label": "D", "text": "Accumulation of CD4+ T cells and increased CD4/CD8 T-cell ratios", "correct": true}], "correct_answer": "D. Accumulation of CD4+ T cells and increased CD4/CD8 T-cell ratios", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old male presents with fever, bilateral hilar lymphadenopathy, erythema nodosum, and acute polyarthritis affecting ankles and knees. He has a history of recurrent uveitis. Laboratory tests show elevated serum angiotensin-converting enzyme (ACE) levels and hypercalcemia. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Lupus pernio", "correct": false}, {"label": "B", "text": "Lofgren's syndrome", "correct": true}, {"label": "C", "text": "Mikulicz syndrome", "correct": false}, {"label": "D", "text": "Systemic Lupus Erythematosus", "correct": false}], "correct_answer": "B. Lofgren's syndrome", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/byZFcbickssRKy1ubRHC1736931490.png", "https://image.prepladder.com/content/u3h2lf0iUlvhlbc2cPgs1736931540.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "In a histopathological examination of a lung biopsy from a patient with suspected sarcoidosis, which of the following microscopic features would be most characteristic and supportive of the diagnosis?", "options": [{"label": "A", "text": "Macrophages with abundant cytoplasm containing dusty brown pigment", "correct": false}, {"label": "B", "text": "Non-necrotizing granulomas with asteroid bodies and Schaumann bodies", "correct": true}, {"label": "C", "text": "Coalescent tubercles with central caseation", "correct": false}, {"label": "D", "text": "Curschmann spirals and Charcot-Leyden crystals", "correct": false}], "correct_answer": "B. Non-necrotizing granulomas with asteroid bodies and Schaumann bodies", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/GlBRq0G4LzyakxAaSjzV1736931597.png", "https://image.prepladder.com/content/83SNPClHTEHHJF7Cq0tE1736931853.png", "https://image.prepladder.com/content/v4qIqti0uMB1dq3rU8p81736931809.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presents with a chronic cough, dyspnea, and chest tightness. On examination, fine crackles are heard bilaterally. A lung biopsy reveals collections of carbon-laden macrophages within the respiratory bronchioles and alveolar ducts, along with focal fibrosis and occasional small granulomas. Which of the following is not a condition associated with this patient?", "options": [{"label": "A", "text": "Anthracosis", "correct": false}, {"label": "B", "text": "Simple Coal Worker’s Pneumoconiosis", "correct": false}, {"label": "C", "text": "Complicated coal Worker’s pneumoconiosis", "correct": false}, {"label": "D", "text": "Psittacosis", "correct": true}], "correct_answer": "D. Psittacosis", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:735px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Simple CWP </strong></p>\n<p style=\"text-align: center;\"><strong>(Option B)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Complicated CWP </strong></p>\n<p style=\"text-align: center;\"><strong>(Option C)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It is characterised by coal macules (1 to 2 mm in diameter) and larger coal nodules containing carbon-laden macrophages and a delicate network of <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> fibres.</li>\n<li>Although these lesions are scattered throughout the lung, the upper lobes and upper zones of the lower lobes are more heavily involved.</li>\n<li>Dilatation of <span class=\"customMeta\" data-dictid=\"0dd428c12116927771819285c8849c\">alveoli</span> adjacent to bronchioles gives rise to <span class=\"customMeta\" data-dictid=\"2287afab0416927771845999a48e25\">centrilobular</span> emphysema.</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>It leads to <strong>progressive massive fibrosis</strong> and large, dark scars measuring 1 to 10 cm in diameter, often appearing in multiple areas.</li>\n<li>Microscopically, these lesions contain dense <span class=\"customMeta\" data-dictid=\"d215f4a56c16927771842f34a24156\">collagen</span> and <span class=\"customMeta\" data-dictid=\"05e2e2617c16927771952bcbeea08b\">pigment</span> deposition.</li>\n<li>Lung function is compromised</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 50-year-old sandblaster presents with chronic cough, dyspnea, and chest pain. Further investigation reveals a history of prolonged exposure to sandblasting. He has also worked for several years in mines, where he was exposed to chronic asbestos and beryllium. A chest X-ray was taken, which is shown below. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Byssinosis", "correct": false}, {"label": "B", "text": "Silicosis", "correct": true}, {"label": "C", "text": "Asbestosis", "correct": false}, {"label": "D", "text": "Berylliosis", "correct": false}], "correct_answer": "B. Silicosis", "question_images": ["https://image.prepladder.com/content/w3hWttKG7GWTxYNkIQQ11736931931.png"], "explanation_images": ["https://image.prepladder.com/content/1HW7Zzr40aAu4Z8jXPHR1736932326.png"], "explanation": "\n<p><strong>References:</strong></p>\n<ul><li>↳ Robbins and Cotran, Pathologic Basis of Disease, 10th edition, Page 691</li><li>↳ Eggshell calcification (lymph nodes) | Radiology Reference Article | Radiopaedia.org</li></u\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/mYOU6U2AfVcIsm7Gy4fb1747306116.mp3", "video": ""}, {"text": "Which of the following is not a cause of eggshell calcification?", "options": [{"label": "A", "text": "Silicosis", "correct": false}, {"label": "B", "text": "Sarcoidosis", "correct": false}, {"label": "C", "text": "Post-radiation therapy", "correct": false}, {"label": "D", "text": "Metastatic lymph nodes", "correct": true}], "correct_answer": "D. Metastatic lymph nodes", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/s1YRK77ZW7NJR3FtOw241736932413.png", "https://image.prepladder.com/content/sW7cfWN1n9zmX9uFN44F1736932477.png", "https://image.prepladder.com/content/cbL4OCd9zIsHJ9xCiTUE1736932519.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following forms of asbestos is more toxic?", "options": [{"label": "A", "text": "Serpentine", "correct": false}, {"label": "B", "text": "Amphibole", "correct": true}, {"label": "C", "text": "Chrysolite", "correct": false}, {"label": "D", "text": "Erionite", "correct": false}], "correct_answer": "B. Amphibole", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:607px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Serpentine/ Chrysolite</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Amphibole/ Crocidolite/ Amosite</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Wavy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Rigid</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>More common</strong> (90% of the asbestos)</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>More pathogenic</strong> (amphiboles particularly associated with <strong>mesothelioma</strong>)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mnemonic:</strong></p>\n<ul>\n<li>I am crying (Chrysotile)</li>\n<li>After looking at a snake (Serpentine)</li>\n<li>Snake is wavy</li>\n<li>Snakes can be seen more commonly (more common)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mnemonic:</strong></p>\n<ul>\n<li>I am on a site (Amosite)</li>\n<li>Saw a Crocodile (Crocidolite)</li>\n<li>Which is an Amphibian</li>\n<li>Crocodile is straight (rigid)</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient has been experiencing dyspnea for the past few weeks. A biopsy of his lungs has revealed the finding given below. What is the characteristic finding shown below in this patient?", "options": [{"label": "A", "text": "Creola body", "correct": false}, {"label": "B", "text": "Schaumann body", "correct": false}, {"label": "C", "text": "Ferruginous body", "correct": true}, {"label": "D", "text": "Asteroid body", "correct": false}], "correct_answer": "C. Ferruginous body", "question_images": ["https://image.prepladder.com/content/gDbwYvF3Qm2YqbQvX2OT1737569402.png"], "explanation_images": ["https://image.prepladder.com/content/3nJJxoYicPwleAFfns1g1736932797.png", "https://image.prepladder.com/content/VYLiOAwAJSPSwHaLSLOT1736932862.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/jxJuCF2civ5FMm5Oykpd1740664886.mp3", "video": ""}, {"text": "A 55-year-old male presents to the clinic with complaints of persistent chest pain, shortness of breath, and unexplained weight loss. He was chronically exposed to minerals when he worked as a shipbuilder. Imaging studies revealed a growth that was subjected to needle biopsy. What is the most common lung malignancy associated with his occupational exposure?", "options": [{"label": "A", "text": "Squamous cell carcinoma", "correct": false}, {"label": "B", "text": "Adenocarcinoma", "correct": true}, {"label": "C", "text": "Mesothelioma", "correct": false}, {"label": "D", "text": "Small cell cancer", "correct": false}], "correct_answer": "B. Adenocarcinoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/qSZ8m2wBFGYJIcWyR3E01736932974.png"], "explanation": "\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Match the following occupational lung diseases with their characteristics. A) Byssinosis 1. Iron exposure B) Bagassosis 2. Monday disease C) Siderosis 3. Non-caseating granuloma. D) Berylliosis 4. Sugarcane dust exposure", "options": [{"label": "A", "text": "A-4, B-2, C-1, D-3", "correct": false}, {"label": "B", "text": "A-2, B-4, C-1, D-3", "correct": true}, {"label": "C", "text": "A-3, B-1, C-4, D-2", "correct": false}, {"label": "D", "text": "A-2, B-1, C-4, D-3", "correct": false}], "correct_answer": "B. A-2, B-4, C-1, D-3", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:NaN\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>A. Byssinosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>2. Monday disease</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>B. Bagassosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>4. Sugarcane dust exposure</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>C. Siderosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>1. Iron exposure</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>D. Berylliosis</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>3. Non-caseating granuloma.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following is incorrect about mesothelioma?", "options": [{"label": "A", "text": "Most specific cancer associated with asbestos exposure", "correct": false}, {"label": "B", "text": "Can lead to frozen hemithorax", "correct": false}, {"label": "C", "text": "Leads to a mediastinal shift", "correct": true}, {"label": "D", "text": "Not associated with smoking", "correct": false}], "correct_answer": "C. Leads to a mediastinal shift", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/hvfJ3qA25c4upiJzXg3z1743572478.png", "https://image.prepladder.com/notes/jEdww8UPhwpSWM1FtKCc1743741404.png", "https://image.prepladder.com/notes/hPkHz1cETIpB1qMdEmf11743616368.png", "https://image.prepladder.com/content/mMYYWvDPa5wBDFcVovfI1737532247.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:742px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mesothelioma</strong></p>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>A rare cancer arising from mesothelial cells that most commonly affects the pleura.</li>\n<li>It can also affect the peritoneum, <span class=\"customMeta\" data-dictid=\"56ab21797f16927771954b343891ef\">pericardium</span> and <span class=\"customMeta\" data-dictid=\"35814a93301692777201bab0f52c19\">tunica</span> vaginalis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Aetiology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Asbestos: <span class=\"customMeta\" data-dictid=\"9f56633f181692777192f07ed38b1a\">Mesothelioma</span> is the most specific asbestos-associated cancer <strong>(Option A)</strong></li>\n<li>It is not associated with smoking <strong>(Option D)</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pathology </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Advanced pleural <span class=\"customMeta\" data-dictid=\"9f56633f181692777192f07ed38b1a\">mesothelioma</span> can cause extensive pleural <span class=\"customMeta\" data-dictid=\"21e2d5a70616927772021fcdec0ca9\">fibrosis</span> and thickening, making the affected side rigid and immobile.</li>\n<li>Later stages fix the <span class=\"customMeta\" data-dictid=\"be2aea1ed01692777192b46ee482a3\">mediastinum</span> in place due to pleural thickening and fibrosis.</li>\n<li>The <span class=\"customMeta\" data-dictid=\"1014e4cf5e169277719246e0ca91df\">mediastinal</span> shift is not a characteristic feature of mesothelioma.</li>\n<li>M/C <span class=\"customMeta\" data-dictid=\"2878159c181692777185d495ce6244\">cytogenetic</span> <span class=\"customMeta\" data-dictid=\"e7ed1a964716927771801ab913204a\">abnormality</span> in mesothelioma: <strong>Homozygous <span class=\"customMeta\" data-dictid=\"cf1e8ec6121692777185eba2630061\">deletion</span> of <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 9p</strong>, leading to <strong>loss</strong> of tumour <span class=\"customMeta\" data-dictid=\"92427347f51692777199a762a91d21\">suppressor</span> gene- <strong>CDKN2A.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical features </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Progressive dyspnea, chest pain, weight loss, chronic cough, hemoptysis.</li>\n<li>Decreased <span class=\"customMeta\" data-dictid=\"baa424d2de16927771836afd73785b\">breath sounds</span> and <span class=\"customMeta\" data-dictid=\"e452a3bf5716927771867e7ea9b4da\">dullness</span> to <span class=\"customMeta\" data-dictid=\"4818bebdf31692777195cc835c12d4\">percussion</span> (due to pleural <span class=\"customMeta\" data-dictid=\"73909075e71692777187f08d3c9b7e\">effusion</span> or thickening).</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Diagnosis </strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>CT scan:</strong> <strong>Pleural thickening, effusion, or frozen hemithorax</strong> (not causing a <span class=\"customMeta\" data-dictid=\"1014e4cf5e169277719246e0ca91df\">mediastinal</span> shift in the presence of effusion) <strong>(Options C and D)</strong></li>\n<li>Confirmed by <strong>biopsy:</strong>\n<ul>\n<li><strong>Epithelioid mesothelioma</strong> shows tubules, nests, or <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> structures with uniform round to <span class=\"customMeta\" data-dictid=\"74793d564816927771943ae4ba74b3\">oval</span> <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and <span class=\"customMeta\" data-dictid=\"91bc3a9b3e16927771871bcff74db7\">eosinophilic</span> cytoplasm.</li>\n<li><strong>Sarcomatoid mesothelioma</strong> consists of spindle-shaped cells resembling fibrosarcoma.</li>\n<li><strong>Biphasic mesothelioma</strong> displays a mixture of both patterns.</li>\n</ul>\n</li>\n</ul>\n<ul>\n<li><strong>Specific</strong> <strong>markers</strong> for mesothelioma:\n\n\t\t\t\t<ul>\n<li>Calretinin.</li>\n<li>Epithelial <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> antigen.</li>\n<li>Cytokeratin.</li>\n<li>Mesothelin.</li>\n</ul>\n</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Prognosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Poor (median survival of 9-21 months).</li>\n</ul>\n</td>\n</tr>\n</tbody>\n</table>\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:700px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p><img alt=\"Mesothelioma Gross\" data-author=\"Yale Rosen\" data-hash=\"6239\" data-license=\"CC BY SA 2.0\" data-source=\"https://www.flickr.com/photos/pulmonary_pathology/3954797985/in/photostream/\" data-tags=\"\" height=\"779\" src=\"https://image.prepladder.com/notes/hvfJ3qA25c4upiJzXg3z1743572478.png\" width=\"500\"/><strong>Mesothelioma- Gross</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"><img alt=\"Mesothelioma H and E\" data-author=\"\" data-hash=\"7254\" data-license=\"\" data-source=\"\" data-tags=\"April2025\" height=\"560\" src=\"https://image.prepladder.com/notes/jEdww8UPhwpSWM1FtKCc1743741404.png\" width=\"376\"/>\n<p><strong>Mesothelioma- <span class=\"customMeta\" data-dictid=\"b35c67a8d316927771883ab652b328\">H & E</span> stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p><img alt=\"Mesothelioma Calretinin\" data-author=\"Nephron\" data-hash=\"6585\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Malignant_epithelioid_mesothelioma_2-2_-_high_mag.jpg#/media/File:Malignant_epithelioid_mesothelioma_-_calretinin_-_intermed_mag.jpg\" data-tags=\"April2025\" height=\"309\" src=\"https://image.prepladder.com/notes/hPkHz1cETIpB1qMdEmf11743616368.png\" width=\"500\"/><strong>Mesothelioma- <span class=\"customMeta\" data-dictid=\"ad92d2982416927771832553fcbe20\">Calretinin</span> stain</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> </td>\n<td colspan=\"2\" rowspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\"> \n\t\t\t<p><img alt=\"\" data-author=\"Leong P, Mesothelioma. Case study, Radiopaedia.org (Accessed on 06 Dec 2024) https://doi.org/10.53347/rID-26805\" data-hash=\"\" data-license=\"NA\" data-source=\"https://radiopaedia.org/cases/mesothelioma-23#image-5530797\" data-tags=\"\" height=\"356\" src=\"https://image.prepladder.com/content/mMYYWvDPa5wBDFcVovfI1737532247.png\" width=\"500\"/><strong>Lobulated pleural soft tissue mass encasing the right lung. Associated <span class=\"customMeta\" data-dictid=\"8f88b9c691169277718754ca072062\">erosion</span> of the right 3rd rib anteriorly. </strong></p>\n<p><strong>Calcified <span class=\"customMeta\" data-dictid=\"e9d028795c169277719520dc71ae4b\">pleural plaques</span> were noted bilaterally, indicating previous <span class=\"customMeta\" data-dictid=\"92cc1e1acb1692777182aee908c1fd\">asbestos</span> exposure.</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><img alt=\"\" custommeta\"=\"\" data-author=\"Gaillard F, <span class=\" data-dictid=\"9f56633f181692777192f07ed38b1a\"/>Mesothelioma - sarcomatoid. Case study, Radiopaedia.org (Accessed on 06 Dec 2024) https://doi.org/10.53347/rID-8705\" data-hash=\"\" data-license=\"NA\" data-source=\"https://radiopaedia.org/cases/mesothelioma-sarcomatoid#image-317742\" data-tags=\"\" height=\"412\" src=\"https://image.prepladder.com/content/Lb5Yo2BxBeec0AAu0gGy1737532157.png\" width=\"500\" /><strong>Coarse, partially calcified right pleural plaques, accompanied by massive right pleural effusion, causing total <span class=\"customMeta\" data-dictid=\"e9046e11bd1692777197e166e5418f\">right lung</span> collapse and mass effect.</strong></p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 21 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Warthin's tumor is also called?", "options": [{"label": "A", "text": "Adenolymphoma", "correct": true}, {"label": "B", "text": "Pleomorphic adenoma", "correct": false}, {"label": "C", "text": "Mucoepidermoid carcinoma", "correct": false}, {"label": "D", "text": "Acinic cell carcinoma", "correct": false}], "correct_answer": "A. Adenolymphoma", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - Adenolymph\n<table>\n<tbody>\n<tr>\n<td>Name</td>\n<td>Warthin's tumor (also known as <strong>adenolymphoma or <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> <span class=\"customMeta\" data-dictid=\"7ed146244a169277719141d7316a85\">lymphomatous</span> cystadenoma</strong>)</td>\n</tr>\n<tr>\n<td>Definition</td>\n<td>Warthin's tumor is a <span class=\"customMeta\" data-dictid=\"1bbae82f1f16927771824f797639fa\">benign</span> salivary <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> tumor that primarily occurs in the <span class=\"customMeta\" data-dictid=\"42d0553c3916927771944110a6f15b\">parotid</span> <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> and is characterized by a <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> structure with <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">lymphoid</span> tissue and <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> epithelial projections.</td>\n</tr>\n<tr>\n<td>Prevalence</td>\n<td>It is the second most common <span class=\"customMeta\" data-dictid=\"1bbae82f1f16927771824f797639fa\">benign</span> salivary <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> tumor, primarily affecting middle-aged to older adults, with a higher <span class=\"customMeta\" data-dictid=\"f86aae0bd61692777196f91458c9dd\">prevalence</span> in males.</td>\n</tr>\n<tr>\n<td>Clinical Presentation</td>\n<td>- Painless, slow-growing mass or lump in the <span class=\"customMeta\" data-dictid=\"42d0553c3916927771944110a6f15b\">parotid</span> <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> region. - Rarely associated with pain or discomfort.</td>\n</tr>\n<tr>\n<td>Risk Factors</td>\n<td>The exact cause is unknown, but there is an association with smoking, especially in men.</td>\n</tr>\n<tr>\n<td>Diagnosis</td>\n<td>- Clinical examination: <span class=\"customMeta\" data-dictid=\"016b53d1731692777194a8d558c428\">Palpation</span> of a firm, mobile mass in the <span class=\"customMeta\" data-dictid=\"42d0553c3916927771944110a6f15b\">parotid</span> <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> area. - Imaging: Ultrasound, CT scan, or <span class=\"customMeta\" data-dictid=\"7ce7bcb2f316927771938e0bea7f4d\">MRI</span> may reveal characteristic features. - Fine-needle <span class=\"customMeta\" data-dictid=\"831d67ad8a1692777182763ca62e4b\">aspiration</span> (FNA): Often performed to confirm the diagnosis and rule out other salivary <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> tumors.</td>\n</tr>\n<tr>\n<td>Histological Features</td>\n<td>- <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">Cystic</span> spaces with <span class=\"customMeta\" data-dictid=\"62b9af909d1692777194cd004f10f4\">papillary</span> projections. - <span class=\"customMeta\" data-dictid=\"32599f889a169277719169e3483e62\">Lymphoid</span> stroma. - Bilayered oncocytic epithelium.</td>\n</tr>\n<tr>\n<td>Treatment</td>\n<td>- <span class=\"customMeta\" data-dictid=\"81d12f9cb01692777199e44ff3f3c1\">Surgical</span> excision: The primary treatment involves complete removal of the tumor while preserving the surrounding salivary <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> tissue. - <span class=\"customMeta\" data-dictid=\"1d849ebc9b1692777197d4af1fa8d2\">Recurrence</span> is rare after excision.</td>\n</tr>\n<tr>\n<td>Complications</td>\n<td>- Although Warthin's tumors are benign, complications can occur during or after surgery, such as damage to the <span class=\"customMeta\" data-dictid=\"9fdd7489051692777202cffe3f24cc\">facial</span> nerve or salivary ducts. - Infrequent <span class=\"customMeta\" data-dictid=\"1d849ebc9b1692777197d4af1fa8d2\">recurrence</span> or development of other salivary <span class=\"customMeta\" data-dictid=\"4744bb90c21692777188c8957f9faa\">gland</span> tumors.</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following features is not observed in pleomorphic adenoma?", "options": [{"label": "A", "text": "Myoepithelial cells", "correct": false}, {"label": "B", "text": "Keratin pearls", "correct": false}, {"label": "C", "text": "Chondroid differentiation", "correct": false}, {"label": "D", "text": "Perineural invasion", "correct": true}], "correct_answer": "D. Perineural invasion", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 12 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A 28-year-old female presents with a painless, bluish, fluctuant and translucent swelling on the lower lip that enlarges with eating or pressure, as shown in the image below. She reports a history of accidentally biting her lip frequently. What histopathological feature would be expected on biopsy of the lesion?", "options": [{"label": "A", "text": "Mucin-filled cavity surroundedby granulation tissue and chronic inflammatory cells.", "correct": true}, {"label": "B", "text": "Proliferation of ductal cells within fibrous connective tissue", "correct": false}, {"label": "C", "text": "Epithelial dysplasia and atypical cells.", "correct": false}, {"label": "D", "text": "Eosinophilic granuloma with multinucleated giant cells", "correct": false}], "correct_answer": "A. Mucin-filled cavity surroundedby granulation tissue and chronic inflammatory cells.", "question_images": ["https://image.prepladder.com/content/AgHvuR2GcYov4eMu0lxt1736912526.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 40-year-old female presents with a slowly growing painless mass in her left parotid gland region that has been present for several months. On examination, a firm, mobile, non-tender mass is palpable in the preauricular area. Fine needle aspiration cytology (FNAC) reveals epithelial and myoepithelial cells in a chondromyxoid background. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Pleomorphic adenoma", "correct": true}, {"label": "B", "text": "Warthin tumor", "correct": false}, {"label": "C", "text": "Mucoepidermoid carcinoma", "correct": false}, {"label": "D", "text": "Adenoid cystic carcinoma", "correct": false}], "correct_answer": "A. Pleomorphic adenoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ucZCausRwNc1aLEvvVgm1736912639.png", "https://image.prepladder.com/content/TBwUHwCsnfPT9h61vu2s1736912695.png", "https://image.prepladder.com/content/YeckeDgUhmininzJsb1u1736912742.png", "https://image.prepladder.com/content/cehco2NvRs6nVgF7HGQm1736912787.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:640px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type of tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Nature of the tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>HPE features </strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Pleomorphic adenoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Benign/ Malignant</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Calicut Medical College\" data-hash=\"\" data-license=\"CC-BY-SA-4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Pleomorphic_Adenoma_Salivary_gland_10x.jpg\" data-tags=\"\" height=\"378\" src=\"https://image.prepladder.com/content/ucZCausRwNc1aLEvvVgm1736912639.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mixed tumor with ductal and <span class=\"customMeta\" data-dictid=\"3014a71dee1692777193ddfcad6aa3\">myoepithelial</span> cells</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Warthin tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Benign</p>\n<p><img alt=\"\" data-author=\"Patel, Disha & Gandhi, Shilpa & Dhruva, Gauravi. (2024). Study of salivary gland cytopathological lesions and categorized according to Milan reporting system at tertiary care centre Rajkot. Indian Journal of Pathology and Oncology. 11. 147-153. 10.18231/j.ijpo.2024.032. \" data-hash=\"\" data-license=\"CC BY-NC-SA 4.0\" data-source=\"https://www.researchgate.net/figure/Warthins-tumor-Papillary-cystic-structure-lined-by-double-layered-oncocytic-epithelial_fig5_382266838\" data-tags=\"\" height=\"325\" src=\"https://image.prepladder.com/content/TBwUHwCsnfPT9h61vu2s1736912695.png\" width=\"500\"/></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Oncocytic cells with double-layered lining</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Mucoepidermoid carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Low to <span class=\"customMeta\" data-dictid=\"cf8f491dba169277719075ce2b5594\">intermediate</span> <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> potential</p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Nephron \" data-hash=\"\" data-license=\"CC-BY-SA-3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Mucoepidermoid_carcinoma_-_very_high_mag.jpg\" data-tags=\"\" height=\"337\" src=\"https://image.prepladder.com/content/YeckeDgUhmininzJsb1u1736912742.png\" width=\"500\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Mucinous and <span class=\"customMeta\" data-dictid=\"5be0ee4ea316927771997104326685\">squamous</span> epithelial cells, variable <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> spaces</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Adenoid <span class=\"customMeta\" data-dictid=\"38c41e122116927771859b63deb0ed\">cystic</span> carcinoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Intermediate to <span class=\"customMeta\" data-dictid=\"ffb779b5ad1692777189091a0aef76\">high-grade</span> malignant</p>\n<p><img alt=\"\" data-author=\"Yale Rosen from USA\" data-hash=\"\" data-license=\"CC-BY-SA-2.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Adenoid_cystic_carcinoma_Case_172_%285601359150%29.jpg\" data-tags=\"\" height=\"303\" src=\"https://image.prepladder.com/content/cehco2NvRs6nVgF7HGQm1736912787.png\" width=\"400\"/></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Cribriform pattern, <span class=\"customMeta\" data-dictid=\"849a50eb4a1692777195de19bee5ed\">perineural</span> invasion</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presents with a painless, slowly growing mass in her left parotid gland. Examination reveals a firm, mobile mass. Biopsy confirms pleomorphic adenoma with characteristic islands of cartilage and foci of bone in a myxoid stroma. Which of the following is incorrect regarding this condition?", "options": [{"label": "A", "text": "Mostly found in the parotid gland", "correct": false}, {"label": "B", "text": "Mixed tumours with ductal, myoepithelial and mesenchymal cells", "correct": false}, {"label": "C", "text": "Radiation exposure is a risk factor", "correct": false}, {"label": "D", "text": "Down-regulation of PLAG1 results in abnormal cell proliferation", "correct": true}], "correct_answer": "D. Down-regulation of PLAG1 results in abnormal cell proliferation", "question_images": ["https://image.prepladder.com/content/UvBtgk5KWfOwAhROpG7s1736912864.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/8csZnqzIyl9a5jKPo1SH1740664853.mp3", "video": ""}, {"text": "A 55-year-old male has a painless, slowly enlarging mass in the left parotid gland over several years. Examination reveals a firm, mobile, non-tender mass. Histological findings confirm pleomorphic adenoma. Which factor is associated with an increased risk of malignant transformation in pleomorphic adenomas?", "options": [{"label": "A", "text": "Younger age of the patient", "correct": false}, {"label": "B", "text": "Larger size of the tumour", "correct": false}, {"label": "C", "text": "Increased age of the lesion", "correct": true}, {"label": "D", "text": "Presence of hyalinized stroma within the tumour", "correct": false}], "correct_answer": "C. Increased age of the lesion", "question_images": [], "explanation_images": [], "explanation": "\n<p><strong>References:</strong></p>\n<ul><li>↳ Reference:</li></u\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/w8euUQUNcjlDIwnuUB6W1745347612.mp3", "video": ""}, {"text": "A 50-year-old male smoker presents with a painless swelling in the parotid region. Fine needle aspiration cytology (FNAC) reveals murky fluid. Which of the following histopathological features is true regarding this condition?", "options": [{"label": "A", "text": "Proliferation of squamous epithelial cells with keratinisation", "correct": false}, {"label": "B", "text": "Oncocytic cells with double-layered lining", "correct": true}, {"label": "C", "text": "Neuroendocrine differentiation", "correct": false}, {"label": "D", "text": "Papillary architecture with psammoma bodies", "correct": false}], "correct_answer": "B. Oncocytic cells with double-layered lining", "question_images": ["https://image.prepladder.com/content/Su2WJgwLAGUtSprk0j2f1736912948.png"], "explanation_images": ["https://image.prepladder.com/notes/VivHKdBvaM3mkwM8MLgF1743740865.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/wKvWeD3mPt1oxHWzJdZ71747670491.mp3", "video": ""}, {"text": "Which of the following statements about Warthin's tumour is true?", "options": [{"label": "A", "text": "It is the most common malignant tumour of the salivary glands.", "correct": false}, {"label": "B", "text": "They are typically located in the parotid gland.", "correct": true}, {"label": "C", "text": "It is more common in females.", "correct": false}, {"label": "D", "text": "Associated with human papillomavirus (HPV) infection.", "correct": false}], "correct_answer": "B. They are typically located in the parotid gland.", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old female presents with a slow-growing painless mass in the left submandibular gland region. Imaging studies reveal a solid lesion with cystic components. Fine needle aspiration cytology (FNAC) shows a mixture of mucin-producing, epidermoid, and intermediate cells. A histopathology image is given below. Which of the following features is true regarding this condition?", "options": [{"label": "A", "text": "Most commonly found in the sublingual salivary glands.", "correct": false}, {"label": "B", "text": "Most are associated with a (11;19) translocation.", "correct": true}, {"label": "C", "text": "Encapsulated tumours.", "correct": false}, {"label": "D", "text": "Histologically characterized by the presence of spindle cells", "correct": false}], "correct_answer": "B. Most are associated with a (11;19) translocation.", "question_images": ["https://image.prepladder.com/content/LLmZSNfn7pVKhxLcRVXi1736913063.png"], "explanation_images": ["https://image.prepladder.com/notes/koLkxgxlWHlUUgk1tVz91737470722.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old male presents with a slowly enlarging painless mass in the right parotid gland region. Imaging studies reveal a solid tumour with a characteristic \"Swiss cheese\" appearance on MRI. Fine needle aspiration cytology (FNAC) shows basaloid cells with cribriform and tubular patterns. Which of the following statements is true regarding this condition?", "options": [{"label": "A", "text": "Most commonly occur in the parotid and submandibular glands.", "correct": true}, {"label": "B", "text": "MYB-NFIB gene rearrangements are present in all cases", "correct": false}, {"label": "C", "text": "Encapsulated lesions with a smooth surface.", "correct": false}, {"label": "D", "text": "Tend to grow rapidly and have a high mitotic rate.", "correct": false}], "correct_answer": "A. Most commonly occur in the parotid and submandibular glands.", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/jgcSEDFdFqnscLayIlcO1736913120.png"], "explanation": "\n<p><strong>References:</strong></p>\n<ul><li>↳ Reference:</li></u\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 18 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "In which following layer of the epidermis would you most likely find the melanin-producing cells of the skin?", "options": [{"label": "A", "text": "Stratum corneum", "correct": false}, {"label": "B", "text": "Stratum spinosum", "correct": false}, {"label": "C", "text": "Stratum granulosum", "correct": false}, {"label": "D", "text": "Stratum basale", "correct": true}], "correct_answer": "D. Stratum basale", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ee3xjSERt3OvBgIKijAj1736915034.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 35-year-old male presents with a rash on his hands and feet characterised by clusters of small, fluid-filled blisters. Histopathological examination of a skin biopsy reveals intracellular oedema of keratinocytes. Which term best describes this histological finding?", "options": [{"label": "A", "text": "Acanthosis", "correct": false}, {"label": "B", "text": "Ballooning", "correct": true}, {"label": "C", "text": "Spongiosis", "correct": false}, {"label": "D", "text": "Parakeratosis", "correct": false}], "correct_answer": "B. Ballooning", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/Qxh5sVT2PeO6NarB3IL11736915350.png", "https://image.prepladder.com/content/hwNZV2r61eLS7IiRdFoy1736915454.png", "https://image.prepladder.com/content/3ci45o9QCTVDLmpbOk4o1736915536.png", "https://image.prepladder.com/content/xp4MzXCFhT984pxYxxDu1736915598.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 10-year-old child exhibits rough, scaly skin on the elbows, knees, and trunk, accompanied by hyperkeratotic plaques. Which skin condition is typically associated with this manifestation of excessive keratin buildup?", "options": [{"label": "A", "text": "Freckles", "correct": false}, {"label": "B", "text": "Lentigo", "correct": false}, {"label": "C", "text": "Nevus", "correct": false}, {"label": "D", "text": "Ichthyosis", "correct": true}], "correct_answer": "D. Ichthyosis", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ZmAYZKcupKfKbckjbIoD1736915757.png", "https://image.prepladder.com/content/8xdjWY7W99GYzJIGysfM1736915683.png", "https://image.prepladder.com/content/rITcDfaKOeVFRDIgEuJv1736916174.png", "https://image.prepladder.com/content/ZbOIc7p4donE1d7RElzu1736915852.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents with a dark, irregularly shaped mole on her back that has rapidly increased in size over the past few months. On examination, the lesion has uneven borders and varying shades of colour. Which of the following is true regarding its pathogenesis?", "options": [{"label": "A", "text": "Associated with TERT mutations", "correct": true}, {"label": "B", "text": "Spreads radially with metastatic potential", "correct": false}, {"label": "C", "text": "Spreads vertically with no metastatic potential", "correct": false}, {"label": "D", "text": "Associated with mutations that decrease telomerase activity", "correct": false}], "correct_answer": "A. Associated with TERT mutations", "question_images": ["https://image.prepladder.com/content/ra3nsJDCbNWx3OIUG7nR1736917036.png"], "explanation_images": ["https://image.prepladder.com/content/SdkB08Ipr4fwWqApoDIe1736916609.png", "https://image.prepladder.com/content/a9p5W0ZdBgtk00SgvJym1736916661.png", "https://image.prepladder.com/content/fcSmywkRHq9GqXgvPjkx1736916735.png", "https://image.prepladder.com/content/DrAAgwMceCkHWTjGJDgz1736916883.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/4dBKKnDCalSLmzHdD7MI1747309623.mp3", "video": ""}, {"text": "A 70-year-old woman presents with a finding as shown in the image. A biopsy confirms basal cell carcinoma. Which molecular pathway is primarily involved?", "options": [{"label": "A", "text": "Hippo pathway signaling", "correct": false}, {"label": "B", "text": "Hedgehog signaling pathway", "correct": true}, {"label": "C", "text": "WNT signaling", "correct": false}, {"label": "D", "text": "RAS/MAPK signaling", "correct": false}], "correct_answer": "B. Hedgehog signaling pathway", "question_images": ["https://image.prepladder.com/content/WYQTtmTxQVJfMmpnjICC1736917123.png"], "explanation_images": ["https://image.prepladder.com/content/mrRAtqqO2q5BvjDaYwQY1736917193.png", "https://image.prepladder.com/content/jJjZOU3Cecru9cK6XBR61736917240.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 25-year-old woman presents with multiple basal cell carcinomas (BCCs) on her face, neck, and back. She also has a history of medulloblastoma, diagnosed during childhood. On examination, she has palmar pits and macrocephaly. Which of the following is not true regarding this syndrome?", "options": [{"label": "A", "text": "Associated with odontogenic keratocysts.", "correct": false}, {"label": "B", "text": "Associated with mutations in the PTCH gene", "correct": false}, {"label": "C", "text": "An Autosomal dominant disorder", "correct": false}, {"label": "D", "text": "Associated with loss of nucleotide excision repair mechanism", "correct": true}], "correct_answer": "D. Associated with loss of nucleotide excision repair mechanism", "question_images": [], "explanation_images": [], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:574px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Repair Mechanism Defect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Associated Defect</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Nucleotide <span class=\"customMeta\" data-dictid=\"20b3ce06c5169277718756ee95c1e9\">Excision</span> Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Xeroderma Pigmentosum (XP)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Base <span class=\"customMeta\" data-dictid=\"20b3ce06c5169277718756ee95c1e9\">Excision</span> Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>MUTYH-Associated <span class=\"customMeta\" data-dictid=\"fe6b8df2fa1692777196938c42762a\">Polyposis</span> (MAP)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mismatch Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Lynch Syndrome (HNPCC)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Homologous <span class=\"customMeta\" data-dictid=\"3a379aaafc1692777197e1f873883d\">Recombination</span> Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>BRCA1/BRCA2 Mutations</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Proteasomal <span class=\"customMeta\" data-dictid=\"d395f610461692777185cbe8b8806d\">Degradation</span> Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Amyotrophic <span class=\"customMeta\" data-dictid=\"fc380e21321692777191739bd99191\">Lateral</span> <span class=\"customMeta\" data-dictid=\"dae4dea0581692777198fdef9fa684\">Sclerosis</span> (ALS)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Chaperone-Mediated Protein Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Cystic Fibrosis</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Cell Cycle <span class=\"customMeta\" data-dictid=\"cd249aae061692777184c11176df48\">Checkpoint</span> Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Ataxia-Telangiectasia (AT)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mitochondrial DNA Repair Defect</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Mitochondrial Myopathy</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 72-year-old man with a history of extensive sun exposure and recent organ transplant presents with a rapidly growing, painless, reddish nodule on his left cheek over two months. Biopsy shows small, round blue cells with salt and pepper chromatin and positivity for neuroendocrine markers. What marker is typically associated with this condition?", "options": [{"label": "A", "text": "S-100", "correct": false}, {"label": "B", "text": "CK20", "correct": true}, {"label": "C", "text": "Melan-A", "correct": false}, {"label": "D", "text": "p40", "correct": false}], "correct_answer": "B. CK20", "question_images": [], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An 18-year-old female has multiple itchy silvery scales on her knees and elbows. A biopsy of the lesion revealed the presence of nuclei and neutrophilic infiltration in the stratum corneum. Match the following with their appropriate answers. a. Auspitz sign 1. Nucelated stratum corneum b. Munro’s microabscess 2. Pinpoint bleed after scraping off old lesion c. Spongiform pustules of kogoj 3. Neutrophilic infiltrate in stratum corneum d. Parakeratosis 4. Neutrophilic infiltrate in stratum spinosum", "options": [{"label": "A", "text": "a-2, b-4, c-3, d-1", "correct": false}, {"label": "B", "text": "a-2, b-3, c-4, d-1", "correct": true}, {"label": "C", "text": "a-1, b-3, c-4, d-2", "correct": false}, {"label": "D", "text": "a-2, b-4, c-3, d-1", "correct": false}], "correct_answer": "B. a-2, b-3, c-4, d-1", "question_images": ["https://image.prepladder.com/content/pfhUhI9zIeaKmsWPTv8g1736917344.png", "https://image.prepladder.com/content/AGO57ROMtBuwpEbz4zdQ1736917394.png"], "explanation_images": ["https://image.prepladder.com/content/4dx6LZaCBkwQHsvzN7fu1732602624.png", "https://image.prepladder.com/content/t4zUQVVEH8jjhSdjERy01736917558.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/OyGlaOTDpMY2yUIxMIJH1740664942.mp3", "video": ""}, {"text": "A 45-year-old female presents to the dermatology clinic with an itchy rash on her wrists and ankles. On examination, small, flat-topped, polygonal, purple papules with fine white lines on their surface are noted. Which of the following is a characteristic histological finding in this condition?", "options": [{"label": "A", "text": "Munro microabscesses", "correct": false}, {"label": "B", "text": "Spongiform pustules", "correct": false}, {"label": "C", "text": "Sawtoothing of the dermo-epidermal junction", "correct": true}, {"label": "D", "text": "Follicular lipping", "correct": false}], "correct_answer": "C. Sawtoothing of the dermo-epidermal junction", "question_images": ["https://image.prepladder.com/content/T76ozINvXo2bVbhw1Prb1736917708.png"], "explanation_images": ["https://image.prepladder.com/content/bmznIHKVaNi4p6TbRgbf1736918072.png", "https://image.prepladder.com/content/t5VAQIGhgoDvyn5yTZjb1736918032.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 55-year-old man presents with widespread blistering of the skin and oral mucosa. Skin biopsy reveals acantholysis and intraepidermal blister formation above the basal layer. Which of the following describes the location of the split in this bullous disorder?", "options": [{"label": "A", "text": "Subcorneal split", "correct": false}, {"label": "B", "text": "Suprabasal split", "correct": true}, {"label": "C", "text": "Subepidermal split", "correct": false}, {"label": "D", "text": "Intraepidermal split", "correct": false}], "correct_answer": "B. Suprabasal split", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/acY7FBcltLzOplMh3dyw1736918597.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 45-year-old woman presents with a slow-growing, painless nodule on her scalp that has recently enlarged. Examination reveals a firm, well-circumscribed nodule. Histopathology shows ductal differentiation with multiple cysts and papillary projections. Which of the following is the most likely diagnosis?", "options": [{"label": "A", "text": "Cylindroma", "correct": true}, {"label": "B", "text": "Pilomatrixoma", "correct": false}, {"label": "C", "text": "Syringoma", "correct": false}, {"label": "D", "text": "Trichilemmoma", "correct": false}], "correct_answer": "A. Cylindroma", "question_images": ["https://image.prepladder.com/content/z3npmVnSnMqTgEbrN3IQ1736918844.png"], "explanation_images": ["https://image.prepladder.com/content/Qs1LF6lCOdtgMmXj0N7X1736918667.png", "https://image.prepladder.com/content/lxksm5cOLCufkuw0Uqkz1736918709.png", "https://image.prepladder.com/content/C4KZnJ5fQJvhukBVnbiQ1736918751.png", "https://image.prepladder.com/content/q4U7SrE64CLIWMMaBP4g1736918800.png", "https://image.prepladder.com/content/LOZ4Dnz9RHCnu4WMU5KV1736918821.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/5PesSlinI9uJt1l1ZTaV1740664959.mp3", "video": ""}, {"text": "A 38-year-old man complains of severe itching and recurrent skin lesions on his elbows, knees, and upper back. His medical history includes occasional gastrointestinal discomfort. Examination reveals bilateral, symmetric lesions with grouped vesicles. Skin biopsy reveals small microabscesses at the tips of dermal papillae. Which of the following is associated with a disease condition?", "options": [{"label": "A", "text": "Associated with Crohn's disease", "correct": false}, {"label": "B", "text": "IgA deposits at dermal papilla tips", "correct": true}, {"label": "C", "text": "Subendothelial blisters", "correct": false}, {"label": "D", "text": "Linear deposits in immunofluorescence", "correct": false}], "correct_answer": "B. IgA deposits at dermal papilla tips", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/vVS5QKwFiYL9mP1Q6H8B1736919072.png", "https://image.prepladder.com/content/dS7fT4RcbJNZxGFhfz9r1736919122.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 3-year-old child has a chronic, non-healing scalp rash, showing red-brown papules and plaques with crusting on examination. Electron microscopy reveals tennis racket-like structures in histiocytes cytoplasm, and immunohistochemical staining confirms CD1a and S100 protein presence. Which mutation is likely associated with this condition?", "options": [{"label": "A", "text": "TP53 mutation", "correct": false}, {"label": "B", "text": "RAS mutation", "correct": false}, {"label": "C", "text": "BRAF mutation", "correct": true}, {"label": "D", "text": "MET mutation", "correct": false}], "correct_answer": "C. BRAF mutation", "question_images": ["https://image.prepladder.com/content/fy1Tv5KI7lgROsrHNgxM1736919218.png"], "explanation_images": ["https://image.prepladder.com/content/8oQb5CuJHbfYd3gu4dUz1736919371.png", "https://image.prepladder.com/content/JGaaLgqaJ3BRObcyzqe11736919274.png"], "explanation": "\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Disease</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>IHC Marker(s)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Basal Cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (BCC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>PTCH1, BerEP4, CK5/6, p63, CD10</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Squamous Cell <span class=\"customMeta\" data-dictid=\"988c19e3131692777183b6744d1920\">Carcinoma</span> (SCC)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>p40, p63, CK5/6, EMA, CD10</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Melanoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>S100, HMB-45, Melan-A, MITF, SOX10</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Actinic Keratosis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>p63, CK5/6, p16</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Psoriasis</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>CD3 (T-cells), CD4, CD8, Ki-67 (proliferation)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Lichen Planus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>CD8 (cytotoxic T-cells), Granzyme B, Ki-67</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Pemphigus Vulgaris</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Desmoglein 1 & 3, CD4, CD8</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Bullous Pemphigoid</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>BP180, BP230, CD4, CD8, IgG</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Vitiligo</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>S100, MITF, Tyrosinase, CD8 (T-cells)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Dermatitis (e.g., <span class=\"customMeta\" data-dictid=\"afad60190f1692777182663499dc42\">Atopic</span> Dermatitis)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>CD3, CD4, CD8, CD30 (activation marker)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Leprosy</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>CD68 (macrophages), Fite-Faraco <span class=\"customMeta\" data-dictid=\"b29a1a16ab1692777199ede1c6e28b\">stain</span> (acid-fast bacilli)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Melanocytic Nevus</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>HMB-45, Melan-A, S100, Ki-67</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Kaposi Sarcoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>HHV-8, CD34, Factor VIII-related antigen</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Paget’s Disease of the Skin</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>CK7, HER2/neu, GCDFP-15</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Keratoacanthoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>CK17, p63, Ki-67</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/aY4NnrzueVaLSK30QmN01740664983.mp3", "video": ""}, {"text": "A 65-year-old male presents with tense blisters on his abdomen and extremities, filled with clear fluid. The skin appears normal between the blisters, which are painful but not itchy. A skin biopsy reveals a subepidermal blister with linear IgG and complement deposition along the basement membrane on direct immunofluorescence as shown in the image. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Epidermolysis Bullosa Acquisita", "correct": false}, {"label": "B", "text": "Bullous Pemphigoid", "correct": true}, {"label": "C", "text": "Pemphigus Vulgaris", "correct": false}, {"label": "D", "text": "Dermatitis Herpetiformis", "correct": false}], "correct_answer": "B. Bullous Pemphigoid", "question_images": ["https://image.prepladder.com/content/lcCm8o7j1JCLYLhYtP5y1736919609.png"], "explanation_images": ["https://image.prepladder.com/content/wzNyy1sBZRHMNU9VNAI31736919800.png", "https://image.prepladder.com/content/7DAeBxnz7z4sC50jeQJi1736919858.png", "https://image.prepladder.com/content/Rc5aWWa2Q6gGHkleBE541736919621.png", "https://image.prepladder.com/content/kmG6eXw9nXNUHLcBUn111736919702.png", "https://image.prepladder.com/content/2DVNJJn50ItVnoT33Ywl1736919741.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Bullous Pemphigoid</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Epidermolysis Bullosa Acquisita</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Subepidermal split</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Subepidermal split</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Linear appearance is at the roof of the bulla</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>The <span class=\"customMeta\" data-dictid=\"d02067c4b51692777191b8eec8b062\">linear</span> appearance is at the floor of the bulla</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"BMC Pediatrics\" data-hash=\"\" data-license=\"CC0 1.0\" data-source=\"https://openi.nlm.nih.gov/detailedresult?img=PMC5322655_12887_2017_813_Fig3_HTML&query=bullous%20pemphigoid&it=xg&lic=by&req=4&npos=42\" data-tags=\"\" height=\"379\" src=\"https://image.prepladder.com/content/kmG6eXw9nXNUHLcBUn111736919702.png\" width=\"500\"/></p>\n<p>direct <span class=\"customMeta\" data-dictid=\"0b338fb71b16927771895a4ee94faa\">immunofluorescence</span> showing <span class=\"customMeta\" data-dictid=\"d02067c4b51692777191b8eec8b062\">linear</span> deposition of <span class=\"customMeta\" data-dictid=\"2d9b37c62116927771891f3784d2c8\">IgG</span> along the basement <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> zone</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"Kravvas G, Veitch D, Perrett CM\" data-hash=\"\" data-license=\"CC BY 4.0\" data-source=\"https://openi.nlm.nih.gov/detailedresult?img=PMC4808691_CRIDM2016-2839104.003&query=epidermolysis%20bullosa%20acquisita&it=xg&lic=by&req=4&npos=3\" data-tags=\"\" height=\"379\" src=\"https://image.prepladder.com/content/2DVNJJn50ItVnoT33Ywl1736919741.png\" width=\"500\"/></p>\n<p>Direct <span class=\"customMeta\" data-dictid=\"c96e15a5a51692777189d1a3ed2ef9\">IMF</span> displaying <span class=\"customMeta\" data-dictid=\"d02067c4b51692777191b8eec8b062\">linear</span> deposition of IgG, IgA, and C3 at the basement <span class=\"customMeta\" data-dictid=\"34cd707428169277719272942b7905\">membrane</span> zone.</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "https://image.prepladder.com/content/0Tc1YQ0Pf5nKuAa3NTSK1740665707.mp3", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 24 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "A child presents with skin eruptions upon exposure to sunlight and is diagnosed with a DNA repair defect. Which type of repair defect is most likely responsible?", "options": [{"label": "A", "text": "Nucleotide excision repair defect", "correct": true}, {"label": "B", "text": "Base excision repair defect", "correct": false}, {"label": "C", "text": "Mismatch repair defect", "correct": false}, {"label": "D", "text": "Recombination repair defect", "correct": false}], "correct_answer": "A. Nucleotide excision repair defect", "question_images": [], "explanation_images": [], "explanation": "<p>Correct Option A - <span class=\"customMeta\" data-dictid=\"94a2f0970016927771932885a3d362\">Nucleotide</span> <span class=\"customMeta\" data-dictid=\"20b3ce06c5169277718756ee95c1e9\">excision</span&g\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the diagnosis based on the image provided:", "options": [{"label": "A", "text": "Tuberculosis (TB)", "correct": false}, {"label": "B", "text": "Malakoplakia", "correct": true}, {"label": "C", "text": "Pyoderma gangrenosum", "correct": false}, {"label": "D", "text": "Squamous cell carcinoma (SCC)", "correct": false}], "correct_answer": "B. Malakoplakia", "question_images": ["https://image.prepladder.com/content/sc1W6ZHGYJaK0YDC6r7F1724851535.png"], "explanation_images": [], "explanation": "<p>Correct Option B – Malakoplak\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A farmer has a lesion on the shoulder. What is the most likely diagnosis based on the histopathological image of the lesion given below?", "options": [{"label": "A", "text": "SCC", "correct": true}, {"label": "B", "text": "BCC", "correct": false}, {"label": "C", "text": "Molluscum contagiosum", "correct": false}, {"label": "D", "text": "Verrucous carcinoma", "correct": false}], "correct_answer": "A. SCC", "question_images": ["https://image.prepladder.com/content/Jq3D4388cjNMfpwqbShp1747306445.png"], "explanation_images": ["https://image.prepladder.com/content/idQTUZuPby4Qks4tN5pq1747306472.png", "https://image.prepladder.com/content/Kx9VMl8r6eW3j2Jd3B5v1747306486.png", "https://image.prepladder.com/content/0g8cKYfLD2WfwPwVXJDU1747306486.png", "https://image.prepladder.com/content/4hud84PweK4l35PUioTP1747306486.png", "https://image.prepladder.com/notes/lDc4XlehiY5WnSvHcGes1747649760.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the histopathological image.", "options": [{"label": "A", "text": "Basal cell carcinoma", "correct": true}, {"label": "B", "text": "Squamous cell carcinoma", "correct": false}, {"label": "C", "text": "Adenocarcinoma", "correct": false}, {"label": "D", "text": "Malignant melanoma", "correct": false}], "correct_answer": "A. Basal cell carcinoma", "question_images": ["https://image.prepladder.com/content/Bj3fM8BqWNhokkG1AakI1747306559.png"], "explanation_images": ["https://image.prepladder.com/content/6b4WxcLKvC6Q5hv5EeKY1747306600.png", "https://image.prepladder.com/notes/HhYRWZ44O7luHH14x19N1747649979.png", "https://image.prepladder.com/content/jg4eWusGgmN986sXelQd1747306600.png", "https://image.prepladder.com/content/1GmIiOY1Kmty8xEAf8Bh1747306600.png", "https://image.prepladder.com/notes/z6rdo0SbR8eQtrb3eFGs1747650219.png", "https://image.prepladder.com/notes/QWhTQENOyvMx5Jvlb7xC1747650179.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "An 8-year-old boy presents with progressive muscle weakness and walking difficulties. On examination, pseudohypertrophy of the calf muscles was noted. Which of the following is true regarding this condition?", "options": [{"label": "A", "text": "Abnormal collagen", "correct": false}, {"label": "B", "text": "Absent dystrophin", "correct": true}, {"label": "C", "text": "Expansions of CAG triplet repeats", "correct": false}, {"label": "D", "text": "Defective fibrillin", "correct": false}], "correct_answer": "B. Absent dystrophin", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Aspect</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Duchenne <span class=\"customMeta\" data-dictid=\"9e2d8a3f5a16927771932c2348ec52\">Muscular</span> <span class=\"customMeta\" data-dictid=\"04568e3d19169277718672d9da94fd\">Dystrophy</span> (DMD)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Type of Mutation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Frameshift mutations</strong> lead to a disrupted reading frame</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Dystrophin Protein</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Dystrophin deficient</li>\n<li><strong>Truncated and unstable (< 3% of normal) </strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Clinical Severity</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Severe, early onset, rapid progression</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Inheritance Pattern</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>X-linked recessive.</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Age of onset</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>Early childhood (Before 5 years)</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A patient underwent surgery for lipoma 5 weeks ago and now presents with a scar at the incision site, which is limited to the original wound boundaries. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Keloid", "correct": false}, {"label": "B", "text": "Exuberant granulation", "correct": false}, {"label": "C", "text": "Hypertrophic scar", "correct": true}, {"label": "D", "text": "Granulation tissue", "correct": false}], "correct_answer": "C. Hypertrophic scar", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/ZUll2rt3l0nWORd0ZNS31745918504.png", "https://image.prepladder.com/content/T7d60DOYATsDPtI3rKdM1745918504.png", "https://image.prepladder.com/content/dX3Edn9wse2Xr6YcI44Q1745918504.png", "https://image.prepladder.com/content/K9ePKhVCweJBKe1USExr1745918504.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Identify the given condition.", "options": [{"label": "A", "text": "Pemphigus Vulgaris", "correct": true}, {"label": "B", "text": "Leprosy", "correct": false}, {"label": "C", "text": "Mycosis fungoides", "correct": false}, {"label": "D", "text": "Visceral leishmaniasis", "correct": false}], "correct_answer": "A. Pemphigus Vulgaris", "question_images": ["https://image.prepladder.com/notes/t31HGWFiJe29Ahlm6Rq31747054996.png"], "explanation_images": ["https://image.prepladder.com/content/G2ZB4Yylsu5i7pDC9E4m1745573518.png", "https://image.prepladder.com/content/9F2NuAXtfm301BDI34YX1745573615.png", "https://image.prepladder.com/content/DdZra4e9v1VB9vVlUE8B1745573617.png", "https://image.prepladder.com/content/Fd8qUoeLRWCB9kE9fGrd1745573629.png", "https://image.prepladder.com/notes/uFgTvoyWRwzLp0CEpWRa1747055298.png", "https://image.prepladder.com/notes/aUV5tXqz4FmBiTC44FrI1747133098.png", "https://image.prepladder.com/content/zvvpEvwzrCkExkDSh0s01745573694.png", "https://image.prepladder.com/notes/4AbTlYgvWDrc14O49Iyc1747056026.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A 5-year-old child who presented with proptosis of one of the eyes was found to have a desmin-positive tumour. What is the probable diagnosis?", "options": [{"label": "A", "text": "Ewing’s sarcoma", "correct": false}, {"label": "B", "text": "Embryonal rhabdomyosarcoma", "correct": true}, {"label": "C", "text": "Leukaemia", "correct": false}, {"label": "D", "text": "Retinoblastoma", "correct": false}], "correct_answer": "B. Embryonal rhabdomyosarcoma", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/d68uAIx0TuwztiyDiDCU1745576049.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td colspan=\"2\" style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p style=\"text-align: center;\"><strong>Rhabdomyosarcoma (RMS)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Origin </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>A <span class=\"customMeta\" data-dictid=\"f8aaf091221692777191f73e810e94\">malignant</span> tumour arising from skeletal muscle progenitors</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Types </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Embryonal rhabdomyosarcoma.</li>\n<li>Alveolar rhabdomyosarcoma.</li>\n<li>Pleomorphic rhabdomyosarcoma.</li>\n<li>Spindle cell/sclerosing rhabdomyosarcoma</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Clinical features</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>It is the most common soft tissue <span class=\"customMeta\" data-dictid=\"82068425041692777198fe3064c370\">sarcoma</span> in children and adolescents.</li>\n<li>It commonly presents in the extremities.</li>\n<li>Pediatric rhabdomyosarcomas mostly arise in the sinuses, head and neck, and <span class=\"customMeta\" data-dictid=\"2fd33fb2ac16927771889901daadeb\">genitourinary</span> tract.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>IHC Positive Markers</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li><strong>Desmin</strong></li>\n<li>Myogenin</li>\n<li>MyoD1</li>\n<li>Muscle-specific actin</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Gross appearance</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>The tumours are often large, soft, and infiltrative, with areas of <span class=\"customMeta\" data-dictid=\"5e84a7987c16927771931012aced83\">necrosis</span> and haemorrhage.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Microscopy </strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>Small, round to spindle-shaped cells with hyperchromatic <span class=\"customMeta\" data-dictid=\"e6b47028191692777193eb698e43b6\">nuclei</span> and scant cytoplasm, sometimes with a <span class=\"customMeta\" data-dictid=\"58f239fc181692777193528b77cc8c\">myxoid</span> stroma, are also seen.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n<table cellspacing=\"0\" style=\"border-collapse:collapse; width:624px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Tumour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Translocation</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Ewing's Sarcoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>t(11;22)</li>\n<li>Fusion of the EWSR1 gene on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 22 with the FLI1 gene on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 11 leads to oncogenesis.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Rhabdomyosarcoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>t(1;13)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Liposarcoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>t(12;16)</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Synovial Sarcoma</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<ul>\n<li>t(x;18)</li>\n<li>The <span class=\"customMeta\" data-dictid=\"a7dfeb385e1692777203302bcf142d\">fusion</span> of the SS18 gene on <span class=\"customMeta\" data-dictid=\"7157c1f59916927771846116d74646\">chromosome</span> 18 with the SSX gene on the X-chromosome promotes <span class=\"customMeta\" data-dictid=\"a4b1eb3c9b1692777194c3a119d72f\">oncogenic</span> transformation.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 18 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "The image below represents the presence of HER2 neu cells in a patient with breast carcinoma. What agent is used to produce this characteristic discolouration?", "options": [{"label": "A", "text": "FITC", "correct": false}, {"label": "B", "text": "Phycoerythrin", "correct": false}, {"label": "C", "text": "Cyanate dye", "correct": false}, {"label": "D", "text": "Diaminobenzidine", "correct": true}], "correct_answer": "D. Diaminobenzidine", "question_images": ["https://image.prepladder.com/content/6a3oSBsuN3PzVqgjitUi1744970515.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A phlebotomist is asked to collect blood samples for a patient undergoing multiple tests. Which of the following is the correct order of blood collection to avoid contamination of the samples based on the additives in the collection tubes?", "options": [{"label": "A", "text": "Light blue → Lavender → Red → Grey", "correct": false}, {"label": "B", "text": "Grey → Red → Light blue → Lavender", "correct": false}, {"label": "C", "text": "Light blue → Red → Lavender → Grey", "correct": true}, {"label": "D", "text": "Red → Lavender → Grey → Light blue", "correct": false}], "correct_answer": "C. Light blue → Red → Lavender → Grey", "question_images": [], "explanation_images": ["https://image.prepladder.com/content/fUmMJtPjbTT8XTsOnlS41745925349.png", "https://image.prepladder.com/content/jI6bjOiHzWwbVIjtYqI41745925363.png", "https://image.prepladder.com/content/wNqzO1mvSIGX5G92rGCm1745925376.png", "https://image.prepladder.com/content/NTW0IugNmmieX7v8AuFp1745925387.png", "https://image.prepladder.com/content/9WZcsjckv7hmN5l2wzHd1745925399.png", "https://image.prepladder.com/content/uxxj2f41zE9mmAEZn4391745925411.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:608px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Vacutainer colour</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Additive</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:1px solid black; vertical-align:top\">\n<p><strong>Uses</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Blood culture</strong></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Broth media (aerobic/anaerobic)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>For detecting bacterial and fungal infections</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Light blue</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Gene Hobbs \" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Partial_thromboplastin_time\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/fUmMJtPjbTT8XTsOnlS41745925349.png\" width=\"2592\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Trisodium citrate</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>For <span class=\"customMeta\" data-dictid=\"42f1e4deb8169277718412c0681a54\">coagulation</span> tests</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Red or Yellow</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"AfroBrazilian\" data-hash=\"\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Blood_collection_tube_(1_kind).jpg\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/jI6bjOiHzWwbVIjtYqI41745925363.png\" width=\"994\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Whispyhistory\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Yellow_vacutainer.jpg\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/wNqzO1mvSIGX5G92rGCm1745925376.png\" width=\"1010\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>No <span class=\"customMeta\" data-dictid=\"8fabe131a916927771802a448a329c\">additive</span> (Red) / <span class=\"customMeta\" data-dictid=\"b0bdc3a1d416927771884d50c944ec\">Gel</span> <span class=\"customMeta\" data-dictid=\"f40e92e7e91692777198595208bb97\">separator</span> (Yellow)</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>For <span class=\"customMeta\" data-dictid=\"1ffaec13de169277719828374cfda0\">serum</span> collection (serology, chemistry)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Green</strong></p>\n<p style=\"text-align:center\"><img alt=\"\" data-author=\"\" data-hash=\"\" data-license=\"\" data-source=\"\" data-tags=\"\" height=\"1000\" src=\"https://image.prepladder.com/content/NTW0IugNmmieX7v8AuFp1745925387.png\" width=\"1000\"/></p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Heparin</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>For <span class=\"customMeta\" data-dictid=\"a0e40688fa169277719572bdb48c92\">plasma</span> collection (chemistry tests)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Lavender</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Whispyhistory,\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:EDTA_(chelator_-_anticoagulant)_for_full_blood_count.jpg\" data-tags=\"\" height=\"1340\" src=\"https://image.prepladder.com/content/9WZcsjckv7hmN5l2wzHd1745925399.png\" width=\"4167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>EDTA</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>For haematology tests (e.g., CBC, blood smears)</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Pink</strong></p>\n<p> </p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>EDTA</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>For <span class=\"customMeta\" data-dictid=\"40e5b091961692777183c9488699bb\">blood bank</span> tests (e.g., crossmatch, blood type</p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid black; border-left:1px solid black; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p><strong>Grey</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"\" data-author=\"Whispyhistory\" data-hash=\"\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Grey_vacutainer.jpg\" data-tags=\"\" height=\"4167\" src=\"https://image.prepladder.com/content/uxxj2f41zE9mmAEZn4391745925411.png\" width=\"1166\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>Potassium <span class=\"customMeta\" data-dictid=\"28ddbfbaa51692777194aa6875fac4\">Oxalate</span> + Sodium Fluoride</p>\n</td>\n<td style=\"border-bottom:1px solid black; border-left:none; border-right:1px solid black; border-top:none; vertical-align:top\">\n<p>For glucose, lactate, and alcohol tests</p>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The given inclusion bodies are characteristic of which of the following organisms?", "options": [{"label": "A", "text": "Human papillomavirus", "correct": false}, {"label": "B", "text": "Cytomegalovirus", "correct": true}, {"label": "C", "text": "Epstein-Barr virus", "correct": false}, {"label": "D", "text": "Herpes simplex virus", "correct": false}], "correct_answer": "B. Cytomegalovirus", "question_images": ["https://image.prepladder.com/notes/w7qN96L2lW2f5frytUw81747379435.png"], "explanation_images": ["https://image.prepladder.com/notes/3Lc1tp4WHlc9mOjSz72M1747379854.png", "https://image.prepladder.com/content/WkyyvQPNsWDfdJUQzoVp1746429508.png", "https://image.prepladder.com/content/1VEjRi02dBzlXamNE6a01746429521.png", "https://image.prepladder.com/content/eDkUi4BZeDAWK66xjlG91746429536.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse\">\n<tbody>\n<tr>\n<td colspan=\"3\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>CMV infection</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Modes of transmission</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Oral route, <span class=\"customMeta\" data-dictid=\"cfad80a0f716927771979aae100f95\">respiratory</span> & body secretions (most common)</li>\n<li>Vertical transmission</li>\n<li>Sexual transmission</li>\n<li>Organ transplantation</li>\n<li>Blood transfusion</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td rowspan=\"5\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Investigations</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Peripheral smear</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p style=\"text-align:center\"><strong>Owl’s eye appearance of <span class=\"customMeta\" data-dictid=\"c3b8b9a17416927771906b1bebb13c\">inclusion</span> bodies</strong></p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Owl’s eye appearance of inclusion bodies\" data-author=\"Manon Auger, Fadi Brimo, Yonca Kanber, Pierre Olivier Fiset, Sophie Camilleri-Broet\" data-hash=\"12807\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/Cytomegalovirus-infected-cells-have-characteristic-nuclear-and-cytoplasmic-inclusions_fig2_327309083\" data-tags=\"May2025\" height=\"213\" src=\"https://image.prepladder.com/notes/3Lc1tp4WHlc9mOjSz72M1747379854.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Virus isolation</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is done by</p>\n<ul>\n<li>Human <span class=\"customMeta\" data-dictid=\"3095c5f0fc1692777202eda8060779\">fibroblast</span> cell line culture</li>\n<li>Shell <span class=\"customMeta\" data-dictid=\"cd235a18081692777202343e31b264\">vial</span> culture</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antigen detected</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PP65</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Antibody detection</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p>It is done by ELISA, and the antibodies detected are</p>\n<ul>\n<li>CMV IgM antibodies.</li>\n<li>CMV IgG antibodies.</li>\n<li>Against PP150 and PP65.</li>\n<li>Against the PP52.</li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>PCR</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li>Used in detecting CMV DNA.</li>\n<li>Quantitative <span class=\"customMeta\" data-dictid=\"6483f3ef3116927771935d328a8ab2\">nucleic acid</span> testing (<strong>QNAT) by PCR is the most sensitive and specific testing.</strong></li>\n</ul>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Treatment</strong></p>\n</td>\n<td colspan=\"2\" style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<ul>\n<li><strong>Ganciclovir</strong> (drug of choice)</li>\n<li><strong>Foscarnet</strong> (in Ganciclovir resistance)</li>\n<li>CMV immunoglobulins and Ganciclovir are given to <span class=\"customMeta\" data-dictid=\"5b9831f3aa169277718395d7361df6\">bone marrow</span> transplant patients.</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The following image shows an instrument used to estimate haemoglobin levels. What does it measure?", "options": [{"label": "A", "text": "Alkaline hematin", "correct": false}, {"label": "B", "text": "Acid hematin", "correct": true}, {"label": "C", "text": "Oxyhemoglobin", "correct": false}, {"label": "D", "text": "Deoxyhemoglobin", "correct": false}], "correct_answer": "B. Acid hematin", "question_images": ["https://image.prepladder.com/notes/dX10nWGnAs8pDgdxLda01746706623.png"], "explanation_images": [], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following methods is iron in tissues stained?", "options": [{"label": "A", "text": "Masson’s trichrome", "correct": false}, {"label": "B", "text": "Prussian blue", "correct": true}, {"label": "C", "text": "PAS", "correct": false}, {"label": "D", "text": "Fite-Faraco", "correct": false}], "correct_answer": "B. Prussian blue", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/xN6nl0OnYsLkIxIhV5511745391454.png", "https://image.prepladder.com/notes/xN6nl0OnYsLkIxIhV5511745391454.png", "https://image.prepladder.com/notes/f0F7pdffbNQg2Dw2YoWz1746706760.png", "https://image.prepladder.com/notes/KSj3tuNSryfWEm2h9gVg1746706800.png", "https://image.prepladder.com/notes/3xaRcqHammuywipjZ8Fy1745391766.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:613px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p><strong>Prussian blue stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #cccccc; vertical-align:bottom\">\n<p>Iron</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #cccccc; vertical-align:bottom\">\n<figure class=\"caption_element\"><img alt=\"Prussian blue\" data-author=\"Kothadia, Jiten & Arju, Rezina & Kaminski, Monica & Mahmud, Arif & Chow, Jonathan & Giashuddin, Shah.\" data-hash=\"11165\" data-license=\"CC BY NC 3.0\" data-source=\"https://www.researchgate.net/figure/Prussian-blue-stain-showing-hemosiderin-deposition-in-glandular-as-well-as-stromal_fig4_296680946\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/xN6nl0OnYsLkIxIhV5511745391454.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Masson Trichrome</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Differentiate Collagen & muscle fibers</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<figure class=\"caption_element\"><img alt=\"Masson trichome stain\" data-author='\"Yen-Ying Chen Matthew M. Yeh\"' data-hash=\"12440\" data-license=\"CC BY-NC-ND 4.0\" data-source=\"https://www.researchgate.net/figure/Masson-trichrome-stain-shows-perivenular-pericellular-chicken-wire-fibrosis-in-the_fig3_342824985\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/f0F7pdffbNQg2Dw2YoWz1746706760.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Fite-Faraco stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Leprosy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<figure class=\"caption_element\"><img alt=\" Fite-Faraco stain\" data-author=\"Dave, Sakshi & Faujdar, Jaya & Kumar, Praveen & Gupta, Pushpendra & Das, Ram & Parashar, Deepti & Chauhan, Devendra & Natrajan, Mohan & Gupta, Umesh & Katoch, V\" data-hash=\"12441\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/Fite-Faraco-staining-of-the-lung-tissue-of-mice-experimentally-infected-with-MDR-isolate_fig1_26761143\" data-tags=\"May2025\" src=\"https://image.prepladder.com/notes/KSj3tuNSryfWEm2h9gVg1746706800.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>PAS stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Glycogen</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<figure class=\"caption_element\"><img alt=\"PAS stain\" data-author=\"Calicut Medical College \" data-hash=\"11168\" data-license=\"CC BY-SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Liver_biopsy_of_glycogen_storage_disorder_PAS_positive.jpg\" data-tags=\"April2025\" src=\"https://image.prepladder.com/notes/3xaRcqHammuywipjZ8Fy1745391766.png\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A woman presents with nodular lesions, 4-6 mm in size, on the inner thighs and peri-anal region. The lesions appear pale, and histopathological examination reveals multiple intracytoplasmic inclusion bodies consistent with Henderson-Patterson bodies. What is the most likely diagnosis?", "options": [{"label": "A", "text": "Trichodysplasia spinulosa", "correct": false}, {"label": "B", "text": "Condyloma acuminata", "correct": false}, {"label": "C", "text": "Molluscum contagiosum", "correct": true}, {"label": "D", "text": "Donovanosis", "correct": false}], "correct_answer": "C. Molluscum contagiosum", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/nTz8XkwlkKv5viK77cQL1745392028.png", "https://image.prepladder.com/notes/AwKi8upOQz9ywymnOme81745391989.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Pair the stains with their corresponding options Stain Corresponding Option 1. Prussian blue stain a. Iron 2. PAS stain b. Glycogen 3. Congo red stain c. Leprosy 4. Fite-Faraco stain d. Amyloid", "options": [{"label": "A", "text": "1-d, 2-c, 3-b, 4-a", "correct": false}, {"label": "B", "text": "1-c, 2-a, 3-b, 4-d", "correct": false}, {"label": "C", "text": "1-a, 2-b, 3-d, 4-c", "correct": true}, {"label": "D", "text": "1-b, 2-a, 3-c, 4-d", "correct": false}], "correct_answer": "C. 1-a, 2-b, 3-d, 4-c", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/sTgEGKF7uOcXAF43KjG81746692586.png", "https://image.prepladder.com/notes/j319SqrtDA6eQwopszKL1745248637.png", "https://image.prepladder.com/notes/8xdbMZXjNf3u9jxPE6Eq1746692612.png", "https://image.prepladder.com/notes/KhedDIHam5vHTwSTzHxD1746692634.png"], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:627px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Corresponding Option</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Images</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Prussian blue stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Iron</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Prussian blue\" data-author=\"Kothadia, Jiten & Arju, Rezina & Kaminski, Monica & Mahmud, Arif & Chow, Jonathan & Giashuddin, Shah.\" data-hash=\"12392\" data-license=\"CC BY NC 3.0\" data-source=\"https://www.researchgate.net/figure/Prussian-blue-stain-showing-hemosiderin-deposition-in-glandular-as-well-as-stromal_fig4_296680946\" data-tags=\"May2025\" height=\"204\" src=\"https://image.prepladder.com/notes/sTgEGKF7uOcXAF43KjG81746692586.png\" width=\"288\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>PAS stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Glycogen</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"PA515\" data-author=\"Department of Pathology, Calicut Medical College\" data-hash=\"10736\" data-license=\"CC BY-SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Periodic_acid%E2%80%93Schiff_stain#/media/File:Liver_biopsy_of_glycogen_storage_disorder_PAS_positive.jpg\" data-tags=\"April2025\" height=\"204\" src=\"https://image.prepladder.com/notes/j319SqrtDA6eQwopszKL1745248637.png\" width=\"274\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Congo red stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Amyloid</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Congo red stain\" data-author=\"Ed Uthman \" data-hash=\"12393\" data-license=\"CC BY 2.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Gastric_Amyloidosis_(Congo_Red_Stain)_(3595839154).jpg\" data-tags=\"May2025\" height=\"199\" src=\"https://image.prepladder.com/notes/8xdbMZXjNf3u9jxPE6Eq1746692612.png\" width=\"235\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p><strong>Fite-Faraco stain</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<p>Leprosy</p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:bottom\">\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"Fite-Faraco stain\" data-author=\"Dave, Sakshi & Faujdar, Jaya & Kumar, Praveen & Gupta, Pushpendra & Das, Ram & Parashar, Deepti & Chauhan, Devendra & Natrajan, Mohan & Gupta, Umesh & Katoch, V\" data-hash=\"12394\" data-license=\"NA\" data-source=\"https://www.researchgate.net/figure/Fite-Faraco-staining-of-the-lung-tissue-of-mice-experimentally-infected-with-MDR-isolate_fig1_26761143\" data-tags=\"May2025\" height=\"179\" src=\"https://image.prepladder.com/notes/KhedDIHam5vHTwSTzHxD1746692634.png\" width=\"254\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "A child presents with multiple skin lesions over the inner thigh and genital areas. Initially, the lesions started as macules and later developed into nodules. Some of the nodules have a central umbilication. The histology of the lesion is shown below. What would be found on a biopsy?", "options": [{"label": "A", "text": "Multinucleate giant cells (Tzanck cells)", "correct": false}, {"label": "B", "text": "Donovan bodies", "correct": false}, {"label": "C", "text": "Henderson-Patterson bodies", "correct": true}, {"label": "D", "text": "Koilocytes", "correct": false}], "correct_answer": "C. Henderson-Patterson bodies", "question_images": ["https://image.prepladder.com/notes/SJnY8rWV1qKbSb5q4Kfi1745254770.png"], "explanation_images": ["https://image.prepladder.com/notes/Akggan9u1OhpZsZuEOMC1745254968.png", "https://image.prepladder.com/notes/P0OveJHeXolXzJ57iSRI1745255113.png", "https://image.prepladder.com/notes/I9Z23W3HfkgBL0ULzuXm1745255184.png", "https://image.prepladder.com/notes/GDH9pq1Gt96VYvjTGroS1745255230.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following needles is commonly used for bone marrow biopsy?", "options": [{"label": "A", "text": "Klima needle", "correct": true}, {"label": "B", "text": "Salah needle", "correct": false}, {"label": "C", "text": "Jamshidi needle", "correct": false}, {"label": "D", "text": "Islam needle", "correct": false}], "correct_answer": "A. Klima needle", "question_images": ["https://image.prepladder.com/notes/7aXEi7JBYob236ebg6C51745255574.png"], "explanation_images": ["https://image.prepladder.com/notes/Il69CFpIXKQAxCyYuK8l1745255815.png", "https://image.prepladder.com/notes/DJAoLFpobBu7ldtsOTao1745255888.png", "https://image.prepladder.com/notes/Fvd7bEFBj5FsfUF1UOqX1746698680.png"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "Which of the following oil red O stain is used?", "options": [{"label": "A", "text": "Formalin fixation", "correct": false}, {"label": "B", "text": "Frozen section", "correct": true}, {"label": "C", "text": "Alcohol fixation", "correct": false}, {"label": "D", "text": "Glutaraldehyde fixation", "correct": false}], "correct_answer": "B. Frozen section", "question_images": [], "explanation_images": ["https://image.prepladder.com/notes/UU6R4YJg3z6iKoxDKK201747052436.jpg"], "explanation": "\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}, {"text": "The vacutainer tube shown in the given image contains the following:", "options": [{"label": "A", "text": "EDTA", "correct": false}, {"label": "B", "text": "Trisodium citrate", "correct": false}, {"label": "C", "text": "NAF - heparin", "correct": false}, {"label": "D", "text": "Clot activator", "correct": true}], "correct_answer": "D. Clot activator", "question_images": ["https://image.prepladder.com/notes/W191Ksa4No7GVBQmQFQy1745315790.png"], "explanation_images": ["https://image.prepladder.com/notes/KG7DS48RZ3UbYSSqtjrD1745315928.png", "https://image.prepladder.com/notes/kgFmNaU7r3cjg6FHUuZV1745315968.png", "https://image.prepladder.com/notes/W191Ksa4No7GVBQmQFQy1745315790.png", "https://image.prepladder.com/notes/qE1uE6hZFKaQlgk2cctB1745316039.png", "https://image.prepladder.com/notes/zHZM4ahdJz94X6btxOxP1745316105.png", "https://image.prepladder.com/notes/Lf6NEwB9TFFUnx60iBWo1745316137.png"], "explanation": "<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center\">Colour</td>\n<td style=\"text-align:center\">Anti-coagulants</td>\n<td style=\"text-align:center\">Uses</td>\n</tr>\n<tr>\n<td>\n<p>Purple/Lavender</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image31\" data-author=\"Whispyhistory,\" data-hash=\"10960\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:EDTA_(chelator_-_anticoagulant)_for_full_blood_count.jpg\" data-tags=\"April2025\" height=\"129\" src=\"https://image.prepladder.com/notes/KG7DS48RZ3UbYSSqtjrD1745315928.png\" width=\"400\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td>\n<p>EDTA (Ca2+ chelating anticoagulant)</p>\n<p>(Option A ruled out)</p>\n</td>\n<td>CBC, Peripheral Smear, ESR, HbA1c</td>\n</tr>\n<tr>\n<td>\n<p>Light Blue</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image16\" data-author=\"Gene Hobbs \" data-hash=\"10961\" data-license=\"CC BY SA 4.0\" data-source=\"https://en.wikipedia.org/wiki/Partial_thromboplastin_time\" data-tags=\"April2025\" height=\"278\" src=\"https://image.prepladder.com/notes/kgFmNaU7r3cjg6FHUuZV1745315968.png\" width=\"173\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td>\n<p>Trisodium Citrate (Ca2+ chelating anticoagulant)</p>\n<p>(Option B ruled out)</p>\n</td>\n<td>ESR, PT, aPTT</td>\n</tr>\n<tr>\n<td>\n<p>Red</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image26\" data-author=\"AfroBrazilian\" data-hash=\"10959\" data-license=\"CC BY SA 3.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Blood_collection_tube_(1_kind).jpg\" data-tags=\"April2025\" height=\"699\" src=\"https://image.prepladder.com/notes/W191Ksa4No7GVBQmQFQy1745315790.png\" width=\"167\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td>\n<p>No anti-coagulant is added.</p>\n<p>Clot <span class=\"customMeta\" data-dictid=\"a095f733351692777180a29940c98a\">activator</span> without gel</p>\n<p>(Option D)</p>\n</td>\n<td>Serum studies (Proteins, enzymes, hormones)</td>\n</tr>\n<tr>\n<td>\n<p>Yellow</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image7\" data-author=\"Whispyhistory\" data-hash=\"10965\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Yellow_vacutainer.jpg\" data-tags=\"April2025\" height=\"412\" src=\"https://image.prepladder.com/notes/qE1uE6hZFKaQlgk2cctB1745316039.png\" width=\"100\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td>Clot activator/Gel separator</td>\n<td>Serum studies (Proteins, enzymes, hormones)</td>\n</tr>\n<tr>\n<td>\n<p>Grey</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image9\" data-author=\"Whispyhistory\" data-hash=\"10966\" data-license=\"CC BY SA 4.0\" data-source=\"https://commons.wikimedia.org/wiki/File:Grey_vacutainer.jpg\" data-tags=\"April2025\" height=\"357\" src=\"https://image.prepladder.com/notes/zHZM4ahdJz94X6btxOxP1745316105.png\" width=\"100\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td>Sodium Fluoride</td>\n<td>\n<p>Blood Glucose</p>\n<p> </p>\n</td>\n</tr>\n<tr>\n<td>\n<p>Green</p>\n<div style=\"text-align:center\">\n<figure class=\"caption_element\" style=\"display:inline-block\"><img alt=\"image33\" data-author=\"NA\" data-hash=\"10967\" data-license=\"NA\" data-source=\"NA\" data-tags=\"April2025\" height=\"300\" src=\"https://image.prepladder.com/notes/Lf6NEwB9TFFUnx60iBWo1745316137.png\" width=\"300\"/>\n<figcaption>{{caption_text}}</figcaption>\n</figure>\n</div>\n</td>\n<td>\n<p>Heparin</p>\n<p>(Option C ruled out)</p>\n</td>\n<td>ABG, Osmotic fragility, flow cytometry, immunophenotyping</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 21 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">
Instructions
Test Features:
Multiple choice questions with single correct answers
Timer-based testing for realistic exam conditions
Mark questions for review functionality
Comprehensive results and performance analysis
Mobile-optimized interface for learning on-the-go
Start Test
<!-- Quiz Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="quiz"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <!-- Progress Bar --> <div class="w-full bg-gray-200 rounded-full h-3 mb-4"> <div class="progress-bar h-3 rounded-full" id="progress-bar" style="width: 0%"></div> </div> <!-- Question Header --> <div class="flex flex-col md:flex-row justify-between items-center mb-4"> <h2 class="text-lg font-semibold" id="question-number">Question <span>1</span> of 4</h2> <p class="text-lg font-semibold mt-2 md:mt-0" id="timer">Time Remaining: <span>00:00</span></p> </div> <!-- Question Content --> <div class="mb-6" id="question-content"> <p class="text-gray-800 mb-4" id="question-text"></p> <div class="flex flex-wrap gap-4 mb-4" id="question-images"></div> <div class="space-y-3" id="options"></div> </div> <!-- Navigation Buttons --> <div class="flex flex-col md:flex-row justify-between items-center gap-2 md:gap-4"> <div class="flex gap-2 w-full md:w-auto"> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="previous-btn">Previous</button> <button class="bg-[#2c5281] text-white px-4 py-3 w-full md:w-32 h-14 rounded-lg hover:bg-[#2c5281] transition" id="next-btn">Next</button> </div> <div class="flex items-center gap-2"> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="mark-review"> Review <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"> <path d="M10 2a1 1 0 00-1 1v14l3.293-3.293a1 1 0 011.414 0L17 17V3a1 1 0 00-1-1H10z" /> </svg> </button> <button class="bg-transparent text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-100 transition flex items-center gap-1" id="nav-toggle"> Question 🧭 </button> <button class="bg-green-500 text-white px-6 py-3 w-44 h-14 rounded-lg hover:bg-green-600 transition w-full md:w-auto" id="submit-test">Submit Test</button> </div> </div> </section> <!-- Results Section --> <section class="container mx-auto px-4 md:px-6 pt-4 md:pt-6 pb-1 hidden section-transition" id="results"> <div class="bg-white rounded-lg shadow-md p-4 md:p-6"> <h2 class="text-2xl font-semibold mb-4">Anaesthesia Machine - Results</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"> <p><strong>Correct:</strong> <span id="correct-count" class="text-[#000000]">0</span></p> <p><strong>Wrong:</strong> <span id="wrong-count" class="text-[#000000]">0</span></p> <p><strong>Unanswered:</strong> <span id="unanswered-count" class="text-[#000000]-500">0</span></p> <p><strong>Marked for Review:</strong> <span id="marked-count" class="text-[#000000]">0</span></p> </div> <h3 class="text-lg font-semibold mb-4" id="result-question-number">Question <span>1</span> of 4</h3> <div class="space-y-6" id="results-content"></div> <div class="result-nav"> <button aria-label="Previous question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" disabled="" id="prev-result">Previous</button> <button aria-label="Toggle results navigation panel" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="results-nav-toggle">Result 🧭</button> <button aria-label="Next question result" class="result-nav-btn bg-[#2c5281] text-white px-6 py-2 rounded-lg hover:bg-[#2c5281] transition" id="next-result">Next</button> </div> <div class="mt-6 flex space-x-4 button-group md:flex-row flex-col"> <button class="bg-green-500 text-white px-6 py-2 rounded-lg hover:bg-green-600 transition" id="take-again">Take Again</button> </div> </div> </section> <!-- Exit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="exit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Leave Test?</h2> <p class="text-gray-700 mb-4">Your progress will be lost if you leave this page. Are you sure you want to exit?</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="continue-test">No, Continue</button> <button class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition" id="exit-test">Yes, Exit</button> </div> </div> </div> <!-- Submit Confirmation Modal --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 hidden" id="submit-modal" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white rounded-lg p-6 max-w-sm w-full"> <h2 class="text-xl font-semibold mb-4">Confirm Submission</h2> <p class="text-gray-700 mb-2">You have attempted <span id="attempted-count">0</span> of 4 questions.</p> <p class="text-gray-700 mb-4"><span id="unattempted-count">0</span> questions are unattempted.</p> <div class="flex justify-end space-x-4"> <button class="bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 transition" id="cancel-submit">Cancel</button> <button class="text-white px-4 py-2 rounded-lg hover:bg-[#1a365d] transition" style="background-color: #2c5281;" id="confirm-submit">Submit Test</button> </div> </div> </div> <!-- Quiz Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 nav-panel hidden overflow-y-auto" id="nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Questions Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-nav">Close</button> </div> </div> <!-- Results Navigation Panel --> <div class="fixed inset-0 bg-black bg-opacity-50 flex items-start justify-center p-4 z-50 results-nav-panel hidden overflow-y-auto" id="results-nav-panel" style="align-items: flex-start; padding-top: 33vh;"> <div class="bg-white shadow-lg p-4 rounded-lg w-full max-w-2xl max-h-[80vh] overflow-y-auto"> <h2 class="text-lg font-semibold mb-4">Results Navigation</h2> <div class="mb-4"> <select class="w-full p-2 border rounded-lg text-gray-700" id="results-nav-filter"> <option value="all">All Questions</option> <option value="answered">Answered</option> <option value="unanswered">Unanswered</option> <option value="marked">Marked for Review</option> </select> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> </div> <div class="grid grid-cols-5 gap-2 md:gap-3" id="results-nav-grid"></div> <button class="mt-4 bg-gray-500 text-white px-4 py-2 rounded-lg hover:bg-gray-600 transition w-full" id="close-results-nav">Close</button> </div> <!-- JavaScript Logic --> <script> // Enable debug mode for detailed logging const DEBUG_MODE = true; // Log debug messages function debugLog(message) { if (DEBUG_MODE) { console.log(`[DEBUG] ${message}`); } } // Initialize questions with error handling let questions = []; let currentResultQuestion = 0; // State for current question in results try { debugLog("Attempting to parse questions_json"); questions = [{"text": "Most common cause of inherited coagulopathy is:", "options": [{"label": "A", "text": "Factor V Leiden mutation", "correct": true}, {"label": "B", "text": "Antithrombin III deficiency", "correct": false}, {"label": "C", "text": "Protein C deficiency", "correct": false}, {"label": "D", "text": "Protein S deficiency", "correct": false}], "correct_answer": "A. Factor V Leiden mutation", "question_images": [], "explanation_images": [], "explanation": "<table cellspacing=\"0\" style=\"border-collapse:collapse; width:713px\">\n<tbody>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Primary disorders (Genetic)</strong></p>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Secondary disorders (Acquired)</strong></p>\n</td>\n</tr>\n<tr>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Common</strong></p>\n<ul>\n<li><strong>Factor V mutation</strong>\n<ul>\n<li>A single-nucleotide <span class=\"customMeta\" data-dictid=\"7a67bdf6f81692777193cfd480f228\">mutation</span> (autosomal dominant inheritance) in the <span class=\"customMeta\" data-dictid=\"14693f062c16927772024df5839c43\">factor V</span> gene makes <span class=\"customMeta\" data-dictid=\"14693f062c16927772024df5839c43\">factor V</span> resistant to <span class=\"customMeta\" data-dictid=\"db5610b3121692777184e0965a9fa4\">cleavage</span> and <span class=\"customMeta\" data-dictid=\"2f7bf58a321692777190e32a914615\">inactivation</span> by protein C.</li>\n</ul>\n</li>\n<li><strong>Prothrombin mutation</strong>\n<ul>\n<li>A single <span class=\"customMeta\" data-dictid=\"94a2f0970016927771932885a3d362\">nucleotide</span> change (G20210A) in the 3′-untranslated region of the <span class=\"customMeta\" data-dictid=\"94b02f097916927771962072dbeeac\">prothrombin</span> gene is <span class=\"customMeta\" data-dictid=\"8d0fca798b1692777191b6cd41880f\">linked</span> to hypercoagulability.</li>\n</ul>\n</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Rare </strong></p>\n<ul>\n<li>Antithrombin III deficiency<strong> </strong><strong>(Option B) </strong></li>\n<li>Protein C <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> <strong>(Option C)</strong></li>\n<li>Protein S <span class=\"customMeta\" data-dictid=\"209b85faf71692777185767d43e3bd\">deficiency</span> <strong>(Option D)</strong></li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Very rare</strong></p>\n<ul>\n<li>Fibrinolysis defects</li>\n<li>Homozygous <span class=\"customMeta\" data-dictid=\"f3c6a6beb81692777189540dd65102\">homocystinuria</span> (deficiency of <span class=\"customMeta\" data-dictid=\"171a92caba1692777185cd85d29e10\">cystathionine</span> β-synthetase)</li>\n</ul>\n</td>\n<td style=\"border-bottom:1px solid #000000; border-left:1px solid #000000; border-right:1px solid #000000; border-top:1px solid #000000; vertical-align:top\">\n<p><strong>Strong Risk Factors for Thrombosis</strong></p>\n<ul>\n<li>Prolonged <span class=\"customMeta\" data-dictid=\"63b27629261692777182cc4d582eca\">bed rest</span> or immobilization</li>\n<li>Myocardial infarction</li>\n<li>Atrial fibrillation</li>\n<li>Tissue injury (surgery, fracture, burn)</li>\n<li>Cancer</li>\n<li>Prosthetic <span class=\"customMeta\" data-dictid=\"e1fb96fd2416927771830dfed40e14\">cardiac</span> valves</li>\n<li>Disseminated <span class=\"customMeta\" data-dictid=\"837d6227d81692777190a063ea2cd4\">intravascular</span> coagulation</li>\n<li>Heparin-induced thrombocytopenia</li>\n<li>Antiphospholipid <span class=\"customMeta\" data-dictid=\"9d7a12cab116927771811a0079086d\">antibody</span> syndrome</li>\n</ul>\n\t\t\t \n\n\t\t\t<p><strong>Other Risk Factors for Thrombosis</strong></p>\n<ul>\n<li>Cardiomyopathy</li>\n<li>Nephrotic syndrome</li>\n<li>Hyperestrogenic states (pregnancy and postpartum)</li>\n<li>Oral <span class=\"customMeta\" data-dictid=\"a13cdc2a8a1692777185da87f2ff85\">contraceptive</span> use</li>\n<li>Sickle cell anemia</li>\n<li>Smoking</li>\n</ul>\n</td>\n</tr>\n</tbody>\n\n\n<p style='font-size: 10px; color: #808080; font-style: italic;'>@dams_new_robot</p>", "bot": "@dams_new_robot", "audio": "", "video": ""}]; if (!Array.isArray(questions) || questions.length === 0) { throw new Error("Questions data is empty or invalid"); } debugLog(`Successfully parsed ${questions.length} questions`); } catch (e) { console.error("Failed to parse questions_json:", e); document.getElementById('error-message').innerHTML = "Error loading quiz data. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; // Fallback to sample questions for testing questions = [ { text: "What is 2 + 2?", options: [ { label: "A", text: "3", correct: false }, { label: "B", text: "4", correct: true }, { label: "C", text: "5", correct: false }, { label: "D", text: "6", correct: false } ], correct_answer: "B. 4", question_images: [], explanation_images: [], explanation: "<p>2 + 2 = 4</p><p>@dams_new_robot</p>", bot: "@dams_new_robot", audio: "", video: "" } ]; debugLog("Loaded fallback questions"); } // Quiz state let currentQuestion = 0; let answers = new Array(questions.length).fill(null); let markedForReview = new Array(questions.length).fill(false); let timeRemaining = 11 * 60; // Duration in seconds let timerInterval = null; const quizId = `{title.replace(/\s+/g, '_').toLowerCase()}`; // Unique ID for local storage // Load saved progress function loadProgress() { try { debugLog("Loading progress from localStorage"); const saved = localStorage.getItem(`quiz_${quizId}`); if (saved) { const { savedAnswers, savedMarked, savedTime } = JSON.parse(saved); answers = savedAnswers || answers; markedForReview = savedMarked || markedForReview; timeRemaining = savedTime !== undefined ? savedTime : timeRemaining; debugLog("Progress loaded successfully"); } else { debugLog("No saved progress found"); } } catch (e) { console.error("Error loading progress:", e); debugLog("Failed to load progress: " + e.message); } } // Save progress function saveProgress() { try { debugLog("Saving progress to localStorage"); localStorage.setItem(`quiz_${quizId}`, JSON.stringify({ savedAnswers: answers, savedMarked: markedForReview, savedTime: timeRemaining })); debugLog("Progress saved successfully"); } catch (e) { console.error("Error saving progress:", e); debugLog("Failed to save progress: " + e.message); } } // Initialize quiz function initQuiz() { try { debugLog("Initializing quiz"); loadProgress(); const startButton = document.getElementById('start-test'); if (!startButton) { throw new Error("Start test button not found"); } startButton.addEventListener('click', startQuiz); debugLog("Start test button listener attached"); document.getElementById('previous-btn').addEventListener('click', showPreviousQuestion); document.getElementById('next-btn').addEventListener('click', showNextQuestion); document.getElementById('mark-review').addEventListener('click', toggleMarkForReview); document.getElementById('nav-toggle').addEventListener('click', toggleNavPanel); document.getElementById('submit-test').addEventListener('click', showSubmitModal); document.getElementById('continue-test').addEventListener('click', closeExitModal); document.getElementById('exit-test').addEventListener('click', () => { debugLog("Exiting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('cancel-submit').addEventListener('click', closeSubmitModal); document.getElementById('confirm-submit').addEventListener('click', submitTest); document.getElementById('take-again').addEventListener('click', () => { debugLog("Restarting test"); localStorage.removeItem(`quiz_${quizId}`); window.location.reload(); }); document.getElementById('review-test').addEventListener('click', () => showResults(currentResultQuestion)); document.getElementById('close-nav').addEventListener('click', toggleNavPanel); document.getElementById('theme-toggle').addEventListener('click', toggleTheme); document.getElementById('nav-filter').addEventListener('change', updateNavPanel); document.getElementById('prev-result').addEventListener('click', showPreviousResult); document.getElementById('next-result').addEventListener('click', showNextResult); document.getElementById('results-nav-toggle').addEventListener('click', toggleResultsNavPanel); document.getElementById('close-results-nav').addEventListener('click', toggleResultsNavPanel); document.getElementById('results-nav-filter').addEventListener('change', updateResultsNavPanel); debugLog("Quiz initialized successfully"); } catch (e) { console.error("Failed to initialize quiz:", e); debugLog("Failed to initialize quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('start-test').disabled = true; } } // Start quiz function startQuiz() { try { debugLog("Starting quiz"); document.getElementById('instructions').classList.add('hidden'); document.getElementById('quiz').classList.remove('hidden'); showQuestion(currentQuestion); startTimer(); updateNavPanel(); debugLog("Quiz started successfully"); } catch (e) { console.error("Error starting quiz:", e); debugLog("Failed to start quiz: " + e.message); document.getElementById('error-message').innerHTML = "Error starting quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); document.getElementById('quiz').classList.add('hidden'); document.getElementById('instructions').classList.remove('hidden'); } } // Show question function showQuestion(index) { try { debugLog(`Showing question ${index + 1}`); currentQuestion = index; const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } document.getElementById('question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('question-text').innerHTML = q.text || "No question text available"; const imagesDiv = document.getElementById('question-images'); imagesDiv.innerHTML = q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg">`).join('') : ''; const optionsDiv = document.getElementById('options'); optionsDiv.innerHTML = q.options && q.options.length > 0 ? q.options.map(opt => ` <button class="option-btn w-full text-left p-3 border rounded-lg ${answers[index] === opt.label ? 'selected' : ''}" onclick="selectOption(${index}, '${opt.label}')" aria-label="Option ${opt.label}: ${opt.text}"> ${opt.label}. ${opt.text} </button> `).join('') : '<p class="text-red-500">No options available</p>'; document.getElementById('previous-btn').disabled = index === 0; document.getElementById('next-btn').disabled = index === questions.length - 1; document.getElementById('mark-review').classList.toggle('marked', markedForReview[index]); updateProgressBar(); saveProgress(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying question:", e); debugLog("Failed to display question: " + e.message); } } // Select option function selectOption(index, label) { try { debugLog(`Selecting option ${label} for question ${index + 1}`); answers[index] = label; const optionsDiv = document.getElementById('options'); const optionButtons = optionsDiv.querySelectorAll('.option-btn'); optionButtons.forEach(btn => { const btnLabel = btn.textContent.trim().split('.')[0]; btn.classList.toggle('selected', btnLabel === label); }); updateNavPanel(); saveProgress(); debugLog(`Option ${label} selected for question ${index + 1}`); } catch (e) { console.error("Error selecting option:", e); debugLog("Failed to select option: " + e.message); } } // Toggle mark for review function toggleMarkForReview() { try { debugLog(`Toggling mark for review on question ${currentQuestion + 1}`); markedForReview[currentQuestion] = !markedForReview[currentQuestion]; document.getElementById('mark-review').classList.toggle('marked', markedForReview[currentQuestion]); updateNavPanel(); saveProgress(); debugLog(`Mark for review toggled for question ${currentQuestion + 1}`); } catch (e) { console.error("Error marking for review:", e); debugLog("Failed to mark for review: " + e.message); } } // Navigate to previous question function showPreviousQuestion() { try { debugLog(`Navigating to previous question from ${currentQuestion + 1}`); if (currentQuestion > 0) { currentQuestion--; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to previous question:", e); debugLog("Failed to navigate to previous question: " + e.message); } } // Navigate to next question function showNextQuestion() { try { debugLog(`Navigating to next question from ${currentQuestion + 1}`); if (currentQuestion < questions.length - 1) { currentQuestion++; showQuestion(currentQuestion); } } catch (e) { console.error("Error navigating to next question:", e); debugLog("Failed to navigate to next question: " + e.message); } } // Handle question navigation click function handleQuestionNavClick(index) { try { debugLog(`Navigating to question ${index + 1} via nav panel`); showQuestion(index); toggleNavPanel(); } catch (e) { console.error("Error handling navigation click:", e); debugLog("Failed to navigate via nav panel: " + e.message); } } // Start timer function startTimer() { try { debugLog("Starting timer"); timerInterval = setInterval(() => { if (timeRemaining <= 0) { debugLog("Timer expired, submitting test"); clearInterval(timerInterval); submitTest(); } else { timeRemaining--; const minutes = Math.floor(timeRemaining / 60); const seconds = timeRemaining % 60; document.getElementById('timer').innerHTML = `Time Remaining: <span>${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}</span>`; saveProgress(); } }, 1000); debugLog("Timer started successfully"); } catch (e) { console.error("Error starting timer:", e); debugLog("Failed to start timer: " + e.message); } } // Update progress bar function updateProgressBar() { try { debugLog("Updating progress bar"); const progress = ((currentQuestion + 1) / questions.length) * 100; document.getElementById('progress-bar').style.width = `${progress}%`; debugLog("Progress bar updated"); } catch (e) { console.error("Error updating progress bar:", e); debugLog("Failed to update progress bar: " + e.message); } } // Update quiz navigation panel function updateNavPanel() { try { debugLog("Updating quiz navigation panel"); const filter = document.getElementById('nav-filter').value; const navGrid = document.getElementById('nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="question-nav-btn ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleQuestionNavClick(${i})" aria-label="Go to Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Quiz navigation panel updated"); } catch (e) { console.error("Error updating quiz navigation panel:", e); debugLog("Failed to update quiz navigation panel: " + e.message); } } // Update results navigation panel function updateResultsNavPanel() { try { debugLog("Updating results navigation panel"); const filter = document.getElementById('results-nav-filter').value; const navGrid = document.getElementById('results-nav-grid'); navGrid.innerHTML = questions.map((_, i) => { if (filter === 'answered' && !answers[i]) return ''; if (filter === 'unanswered' && answers[i]) return ''; if (filter === 'marked' && !markedForReview[i]) return ''; return ` <button class="result-nav-btn-grid ${answers[i] ? 'answered' : 'unanswered'} ${markedForReview[i] ? 'marked-nav' : ''}" onclick="handleResultNavClick(${i})" aria-label="Go to Result for Question ${i + 1}"> ${i + 1} </button> `; }).join(''); debugLog("Results navigation panel updated"); } catch (e) { console.error("Error updating results navigation panel:", e); debugLog("Failed to update results navigation panel: " + e.message); } } // Toggle quiz navigation panel function toggleNavPanel() { try { debugLog("Toggling quiz navigation panel"); const navPanel = document.getElementById('nav-panel'); navPanel.classList.toggle('hidden'); debugLog("Quiz navigation panel toggled"); } catch (e) { console.error("Error toggling quiz navigation panel:", e); debugLog("Failed to toggle quiz navigation panel: " + e.message); } } // Toggle results navigation panel function toggleResultsNavPanel() { try { debugLog("Toggling results navigation panel"); const resultsNavPanel = document.getElementById('results-nav-panel'); resultsNavPanel.classList.toggle('hidden'); if (!resultsNavPanel.classList.contains('hidden')) { updateResultsNavPanel(); } debugLog("Results navigation panel toggled"); } catch (e) { console.error("Error toggling results navigation panel:", e); debugLog("Failed to toggle results navigation panel: " + e.message); } } // Handle result navigation click function handleResultNavClick(index) { try { debugLog(`Navigating to result for question ${index + 1} via nav panel`); showResults(index); toggleResultsNavPanel(); } catch (e) { console.error("Error handling result navigation click:", e); debugLog("Failed to navigate to result: " + e.message); } } // Show submit modal function showSubmitModal() { try { debugLog("Showing submit modal"); const attempted = answers.filter(a => a !== null).length; document.getElementById('attempted-count').textContent = attempted; document.getElementById('unattempted-count').textContent = questions.length - attempted; document.getElementById('submit-modal').classList.remove('hidden'); debugLog("Submit modal displayed"); } catch (e) { console.error("Error showing submit modal:", e); debugLog("Failed to show submit modal: " + e.message); } } // Close submit modal function closeSubmitModal() { try { debugLog("Closing submit modal"); document.getElementById('submit-modal').classList.add('hidden'); debugLog("Submit modal closed"); } catch (e) { console.error("Error closing submit modal:", e); debugLog("Failed to close submit modal: " + e.message); } } // Close exit modal function closeExitModal() { try { debugLog("Closing exit modal"); document.getElementById('exit-modal').classList.add('hidden'); debugLog("Exit modal closed"); } catch (e) { console.error("Error closing exit modal:", e); debugLog("Failed to close exit modal: " + e.message); } } // Submit test function submitTest() { try { debugLog("Submitting test"); clearInterval(timerInterval); document.getElementById('quiz').classList.add('hidden'); document.getElementById('submit-modal').classList.add('hidden'); document.getElementById('results').classList.remove('hidden'); showResults(0); // Start with first question // Trigger confetti animation confetti({ particleCount: 100, spread: 70, origin: { y: 0.6 } }); localStorage.removeItem(`quiz_${quizId}`); debugLog("Test submitted successfully"); } catch (e) { console.error("Error submitting test:", e); debugLog("Failed to submit test: " + e.message); } } // Show result for a single question function showResults(index) { try { debugLog(`Showing result for question ${index + 1}`); currentResultQuestion = index; let correct = 0, wrong = 0, unanswered = 0, marked = 0; answers.forEach((answer, i) => { const isCorrect = answer && questions[i].options.find(opt => opt.label === answer)?.correct; if (answer === null) unanswered++; else if (isCorrect) correct++; else wrong++; if (markedForReview[i]) marked++; }); const q = questions[index]; if (!q) { throw new Error(`Question ${index} is undefined`); } const userAnswer = answers[index]; const isCorrect = userAnswer && q.options.find(opt => opt.label === userAnswer)?.correct; const resultsContent = document.getElementById('results-content'); resultsContent.innerHTML = ` <div class="border p-4 rounded-lg ${isCorrect ? 'bg-green-50' : userAnswer ? 'bg-red-50' : 'bg-gray-50'}"> <p class="font-semibold">Question ${index + 1}: ${q.text || 'No question text'}</p> ${q.question_images && q.question_images.length > 0 ? q.question_images.map(url => `<img src="${url}" alt="Question Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} <p><strong>Your Answer:</strong> ${userAnswer ? `${userAnswer}. ${q.options.find(opt => opt.label === userAnswer)?.text || 'Invalid option'}` : 'Unanswered'}</p> <p><strong>Correct Answer:</strong> ${q.correct_answer || 'Unknown'}</p> <div class="mt-2">${q.explanation || 'No explanation available'}</div> ${q.explanation_images && q.explanation_images.length > 0 ? q.explanation_images.map(url => `<img src="${url}" alt="Explanation Image" class="max-w-full h-auto rounded-lg my-2">`).join('') : ''} ${q.video ? ` <button class="play-video bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadVideo(this, '${q.video}', 'video-${index}')" aria-label="Play explanation video for Question ${index + 1}"> Play Video Explanation </button> <div id="video-${index}" class="video-container mt-2"></div> ` : '<p class="text-gray-500 mt-2">No video available</p>'} ${q.audio ? ` <button class="play-audio bg-blue-500 text-white px-4 py-2 rounded-lg mt-2" onclick="loadAudio(this, '${q.audio}', 'audio-${index}')" aria-label="Play audio explanation for Question ${index + 1}"> Play Audio Explanation </button> <div id="audio-${index}" class="audio-container mt-2"></div> ` : ''} </div> `; document.getElementById('correct-count').textContent = correct; document.getElementById('wrong-count').textContent = wrong; document.getElementById('unanswered-count').textContent = unanswered; document.getElementById('marked-count').textContent = marked; document.getElementById('result-question-number').innerHTML = `Question <span>${index + 1}</span> of ${questions.length}`; document.getElementById('prev-result').disabled = index === 0; document.getElementById('next-result').disabled = index === questions.length - 1; updateResultsNavPanel(); window.scrollTo({ top: 0, behavior: 'smooth' }); debugLog(`Result for question ${index + 1} displayed successfully`); } catch (e) { console.error("Error displaying result:", e); debugLog("Failed to display result: " + e.message); } } // Navigate to previous result function showPreviousResult() { try { debugLog(`Navigating to previous result from question ${currentResultQuestion + 1}`); if (currentResultQuestion > 0) { showResults(currentResultQuestion - 1); } } catch (e) { console.error("Error navigating to previous result:", e); debugLog("Failed to navigate to previous result: " + e.message); } } // Navigate to next result function showNextResult() { try { debugLog(`Navigating to next result from question ${currentResultQuestion + 1}`); if (currentResultQuestion < questions.length - 1) { showResults(currentResultQuestion + 1); } } catch (e) { console.error("Error navigating to next result:", e); debugLog("Failed to navigate to next result: " + e.message); } } // Lazy-load video function loadVideo(button, videoUrl, containerId) { try { debugLog(`Loading video for ${containerId}: ${videoUrl}`); if (!videoUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No video available</p>`; button.remove(); debugLog("No video URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <div class="video-loading"></div> <video controls class="w-full max-w-[600px] rounded-lg" preload="metadata" aria-label="Video explanation"> <source src="${videoUrl}" type="${videoUrl.endsWith('.m3u8') ? 'application/x-mpegURL' : 'video/mp4'}"> Your browser does not support the video tag. </video> `; container.classList.add('active'); button.remove(); // Initialize HLS.js for .m3u8 videos const video = container.querySelector('video'); if (videoUrl.endsWith('.m3u8') && Hls.isSupported()) { const hls = new Hls(); hls.loadSource(videoUrl); hls.attachMedia(video); hls.on(Hls.Events.ERROR, (event, data) => { console.error("HLS.js error:", data); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("HLS.js error: " + JSON.stringify(data)); }); } else if (videoUrl.endsWith('.m3u8') && video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoUrl; } // Handle video load errors video.onerror = () => { console.error("Video load error for URL:", videoUrl); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; debugLog("Video load error for URL: " + videoUrl); }; // Remove loading spinner when video is ready video.onloadedmetadata = () => { container.querySelector('.video-loading').remove(); debugLog("Video loaded successfully"); }; } catch (e) { console.error("Error loading video:", e); debugLog("Failed to load video: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading video. <a href="${videoUrl}" target="_blank" aria-label="Open video in new tab">Open video</a></p>`; } } // Lazy-load audio function loadAudio(button, audioUrl, containerId) { try { debugLog(`Loading audio for ${containerId}: ${audioUrl}`); if (!audioUrl) { const container = document.getElementById(containerId); container.innerHTML = `<p class="text-gray-500">No audio available</p>`; button.remove(); debugLog("No audio URL provided"); return; } const container = document.getElementById(containerId); container.innerHTML = ` <audio controls class="w-full max-w-[600px]" preload="metadata" aria-label="Audio explanation"> <source src="${audioUrl}" type="audio/mpeg"> Your browser does not support the audio tag. </audio> `; container.classList.add('active'); button.remove(); // Handle audio load errors const audio = container.querySelector('audio'); audio.onerror = () => { console.error("Audio load error for URL:", audioUrl); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; debugLog("Audio load error for URL: " + audioUrl); }; debugLog("Audio loaded successfully"); } catch (e) { console.error("Error loading audio:", e); debugLog("Failed to load audio: " + e.message); const container = document.getElementById(containerId); container.innerHTML = `<p class="text-red-500">Error loading audio. <a href="${audioUrl}" target="_blank" aria-label="Open audio in new tab">Open audio</a></p>`; } } // Toggle dark mode function toggleTheme() { try { debugLog("Toggling theme"); document.documentElement.classList.toggle('dark'); localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); debugLog("Theme toggled successfully"); } catch (e) { console.error("Error toggling theme:", e); debugLog("Failed to toggle theme: " + e.message); } } // Load theme preference function loadTheme() { try { debugLog("Loading theme preference"); const theme = localStorage.getItem('theme'); if (theme === 'dark') { document.documentElement.classList.add('dark'); } debugLog("Theme loaded successfully"); } catch (e) { console.error("Error loading theme:", e); debugLog("Failed to load theme: " + e.message); } } // Initialize on DOM content loaded window.addEventListener('DOMContentLoaded', () => { try { debugLog("DOM content loaded, initializing quiz"); loadTheme(); initQuiz(); } catch (e) { console.error("Error during DOMContentLoaded:", e); debugLog("Failed to initialize on DOMContentLoaded: " + e.message); document.getElementById('error-message').innerHTML = "Error initializing quiz. Please check the console for details or contact support."; document.getElementById('error-message').classList.remove('hidden'); } }); </script> </body> </html>" frameborder="0" width="100%" height="2000px">